access with asp.net

I am trying to link asp.net with access (something I hate to do).  I am trying to run the following query from vb:

SELECT firstName, lastName FROM people WHERE lastName LIKE 'K*'

when I run it in my DB directly, it works, but when I run it through the code, nothing gets returned.  The connection to the DB works just fine otherwise.  Any ideas??  I have a question open in the Access section too.  Any answers will get credit for both.

http://www.experts-exchange.com/Databases/MS_Access/Q_21381895.html
ARACK04Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
MikeMCSDConnect With a Mentor Commented:
Give this a try:
SELECT firstName, lastName FROM people WHERE lastName LIKE '%"K"%'
or
SELECT firstName, lastName FROM people WHERE lastName LIKE '*"K"*'

In Access, it's one of these, I forget which one . . I think the first:
WHERE lastName LIKE '%" & varSearch & "%'
WHERE lastName LIKE '*" & varSearch & "*'
0
 
vladimir_kalashnikovCommented:
you will have to post all of the asp.net data access code for use to understand why it isn't working
0
All Courses

From novice to tech pro — start learning today.