ADO problems with VB.NET 2003

  • Thread starter Thread starter Rubber Steve
  • Start date Start date
R

Rubber Steve

I am having trouble querying an Access database with ADO .NET in VB .NET. I
can get results returned using primary keys, but when using something like
LastName, nothing happens. I am not sure why this is. Here is the query
that works, and the one that doesn't:

Works:
cmd = New OleDbCommand("select * from employee where EmployeeID= " &
txtEmployeeID.Text, cn)

Does Not Work:
cmd = New OleDbCommand("select * from employee where EmpLastName like " &
txtLast.Text, cn)

Any help would be greatly appreciated,

Rubber Steve
 
Back
Top