I am trying to look up records by the first letter of the last name in SQL Express ADO recordsets.
"Select * from people where people.lastname like 'a%'"
works correctly. (a*) works also.
ptRs.movefirst
PtRs.Find "lastname LIKE 'a%'", 0, adSearchForward
Does not work, does not find anything, but if I use 'a %' ('a<space>%') it finds the first last name starting with a.
Why does a% not work. Can you not use wild characters in Find Statements in SQL Express?
find is not a sql server statement rather than a ADO statement: http://www.devguru.com/technologies/ado/quickref/recordset_find.html
For wildcards in ADO you have to use the asteriks.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||
Thanks for the ADO versus SQL, I did not understand that.
IT returns the exact same with asterix in the find?
Am I doing it wrong or missing something?
No comments:
Post a Comment