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

Different results in VB6 ADODB & Access 2003 (11.5614.5606).

P: n/a
I'm using ADODB to connect to an Access database from VB6. I'm running
a query that's returning strange results- the following query returns
different results in VB & Access:

SELECT * FROM Robes WHERE strSize NOT LIKE '*+';

I've also run the following three queries in VB with the record count
indicated beneath. Access seems to handle the queries fine, but VB
seems to be having problems with the WHERE clause.

SELECT * FROM Students WHERE strSize NOT LIKE '*+';
SELECT * FROM Students WHERE strSize LIKE '*+';
SELECT * FROM Students

Thanks in advance for any help you're able to provide.

Feb 3 '06 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Let me add the connection string and code I'm using to pass the SQL to

Set cnnMain = New ADODB.Connection
cnnMain.Open "DSN=MS Access Database;DBQ=" & DB_File & ";DefaultDir=" &
DB_Path & ";DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;UID=admin; "

Set rsMain = New ADODB.Recordset
rsMain.ActiveConnection = cnnMain
rsMain.CursorLocation = adUseClient
rsMain.CursorType = adOpenKeyset
rsMain.LockType = adLockOptimistic
rsMain.Source = strSQLString

Feb 3 '06 #2

P: n/a
The ADO wildcard is "%".

Feb 3 '06 #3

P: n/a
Thank you. I do so love it when it's an easy answer.

Feb 3 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.