473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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 '*+';
10321
SELECT * FROM Students WHERE strSize LIKE '*+';
0
SELECT * FROM Students
20118

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

Feb 3 '06 #1
3 2666
Let me add the connection string and code I'm using to pass the SQL to
Access:

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
rsMain.Open

Feb 3 '06 #2
The ADO wildcard is "%".

Feb 3 '06 #3
Thank you. I do so love it when it's an easy answer.

Feb 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve Farber | last post by:
I'm not especially new to databases and I have used ODBC before with other data sources, but I cannot seem to get Access 2003 to talk to MySQL 4.0.15. I have MySQL running with new tables...
1
by: Dr. Popper | last post by:
What about DDE & Access 2003? I see in msdn and I found methods for Access 2002/XP and 2000, but nothing for 2003.. Is the same method like in 2000 or 2002? Thanx in advance. --...
1
by: Lirva Smith via AccessMonster.com | last post by:
Hi, I just purchased Access 2003 and wondered how I can figure out what Edition I have - if it's standard or professional. I've been looking all over to find this info and can't. This is the...
0
by: google | last post by:
The following query returns the proper recordset in Access 2003, but yields EOF in Visual Basic 6 using ADODB recordsets. Any suggestions as to why this might be the case? SELECT * FROM...
0
by: jayohare | last post by:
Hello, I have code within my DB application to process credit cards through authorize.net. Ive been using the same code for several years without a problem. I have an order entry computer and...
1
by: SharonStainsby | last post by:
Hi, I've just joined this forum and found another thread asking the same question but couldn't see any answers. I hope today is different. I've loaded Access 2003 and Access 2003 Developer...
3
by: Phil B | last post by:
Hi everyone I wrote a VB event that can be run from a form The code allows the user to open a file from the system using an MS dialog control. It works fine in one office (4 computers ) but...
8
by: cgrider | last post by:
ok I ma having a problem trying to filter out extra data from a table to generate a report the table has a list of drawings and a particular project number associated with it so I created a report...
2
by: Marianne160 | last post by:
Hi, I would like to update a table based on another one by adding any missing records from one to the other. I can't do this in the update query as this won't add records and I can't see how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.