473,809 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2707
Let me add the connection string and code I'm using to pass the SQL to
Access:

Set cnnMain = New ADODB.Connectio n
cnnMain.Open "DSN=MS Access Database;DBQ=" & DB_File & ";DefaultDi r=" &
DB_Path & ";DriverId=25;F IL=MS
Access;MaxBuffe rSize=2048;Page Timeout=5;UID=a dmin;"

Set rsMain = New ADODB.Recordset
rsMain.ActiveCo nnection = cnnMain
rsMain.CursorLo cation = adUseClient
rsMain.CursorTy pe = adOpenKeyset
rsMain.LockType = adLockOptimisti c
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
2754
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 defined, but I cannot get a connection to those tables via ODBC using MyODBC 3.51. Can anyone point the way? Many thanks,
1
2104
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
1567
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 number that appears in the About MS Access window(11.5614.5606) Thanks!
0
466
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 (Robes LEFT JOIN Collars ON Robes.nCollarID = Collars.nCollarID) LEFT JOIN Colors ON Robes.nColorID = Colors.nColorID WHERE (((Robes.nStudentID)=24015));
0
2341
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 after reinstalling Win XP, we used Office/Access 2003. When we try to process CC's we get a debug screen and Access itself crashes. However, the code still runs fine on Access/Office XP. The debug screen says: Method 'doSSLPost' of object...
1
1367
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 extensions onto my PC. When I go to the package wizard it opens an empty dialogue box with just the NEXT, CANCEL and HELP buttons showing. Do I need the full Office 2003 or is there another solution? Sharon
3
1808
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 when I place in in another office the MS Dislog control is missing??? and get a dialog box to that effect . The files are in System32 folder of windows. Access 2002 & Access 2003. Why would this happen ? I am on vacation now and don't have...
8
1732
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 based on this query select * from tblwiringdiagram where project number = now this works great. then i get an Oh BTW we only need to show the latestest revisions of a particular drawing that is part of a project so iam having a problem...
2
1779
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 select only those records that are different before appending in Access 2003. Having searched around it looks like Access 2007 has an unmatched query wizard is there anything similar in 2003? Does anyone know how to do in a way that is relatively...
0
9722
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10643
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10391
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10121
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3862
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.