General information
Category:
Database DAO/RDO/ODBC/ADO
Hi,All.
I have problem with LIKE operator in select statement in ADO with Access Data base.
When i run such :select * from table where companyname like 'A*' from inside
access query everything works ok.But it 's not working when i try to create
recordset:
ssql = "select * from table where companyname like 'A*'"
Set rsleaves = New ADODB.Recordset
rsleaves.CursorLocation = adUseClient
rsleaves.Open sSql, cn, adOpenStatic, adLockReadOnly
But if i open recordset with all records and apply filter it works fine.
ssql = "select * from table "
Set rsleaves = New ADODB.Recordset
rsleaves.CursorLocation = adUseClient
rsleaves.Open sSql, cn, adOpenStatic, adLockReadOnly
rsleaves.filter = "companyname like 'A*'"
Why it happened?
Thank you
Alex
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only