By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,064 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,064 IT Pros & Developers. It's quick & easy.

ADO problems with VB.NET 2003

P: n/a
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

Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
* "Rubber Steve" <ru*********@steverino.com.nospam> scripsit:
I am having trouble querying an Access database with ADO .NET in VB
.NET.


For database-related questions, consider posting to this group:

<news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet>

Web interface:

<http://msdn.microsoft.com/newsgroups/default.asp?url=/newsgroups/loadframes.asp?icp=msdn&slcid=us&newsgroup=microso ft.public.dotnet.framework.adonet>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
<URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.