473,320 Members | 1,904 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,320 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 2663
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.