Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 25th, 2004, 05:01 AM
rjp rjp is offline
Registered User
 
Join Date: Aug 2004
Location: Perth, WA, Australia.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB sql in Access VBA

the access vba threads are locked so this is the next best place.

I have written code in VBA using ADODB to modify Access tables (not unusual in itself). Is there any good reason why ADODB does not recognise '*' as a wildcard character?
I found that '%' seems to work the way '*' should???
Its lucky i dont need to do much in the way of character wildcards because if '%' = '*' then what equals '%' ie how do you specify a wildcard character (alphanumeric)

I hope that makes sense.


Reply With Quote
  #2 (permalink)  
Old August 25th, 2004, 08:43 AM
Authorized User
 
Join Date: Jul 2004
Location: cleveland, oh, USA.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

% is the wildcard for ADODB, * is for Jet. If you wanted to use *, you would have to use DAO not ADO. I don't fully understand the rest of your question though...
Reply With Quote
  #3 (permalink)  
Old August 25th, 2004, 07:27 PM
rjp rjp is offline
Registered User
 
Join Date: Aug 2004
Location: Perth, WA, Australia.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the clarification on the wildcard conventions.

The second question (written overly convoluted-apologies) was simply:
what is the single character wildcard for ADO?

Like i should have done in the beginning i did a search and found that the MSDN site had this to say about wildcards differences between ADO and DAO (see bottom part). Anyhoo maybe this will be of help to someone else.

"*******The ADO monkey wrench*********
Though Access supports SQL statements, Access SQL doesn't completely adhere to ANSI SQL standards. In Access 97, Access SQL most closely resembles the SQL-89 standard. However, with the release of Jet 4.0 in Access 2000, Access SQL was updated to more closely emulate the SQL-92 standard through syntax exposed by ADO and the Microsoft Jet OLE DB Provider. This impacts many aspects of using SQL statements in code, one of which is wildcard behavior. The pattern-matching characters we looked at last month were provided through DAO. Rather than using the asterisk (*) and question mark (?) symbols as wildcards, ADO requires that you use the percent sign (%) to match multiple characters and the underscore (_) to match a single character. There's no single-digit wildcard available through ADO that equates to DAO's pound sign wildcard (#); however, character lists and ranges behave the same."



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which Book for VBA/Access/SQL/Excel? rmg VB Databases Basics 0 July 29th, 2004 03:19 PM
Access VBA - SQL question. Raelz Access VBA 4 February 10th, 2004 11:28 PM
Access 2002 VBA with SQL using a variable cpopham Access VBA 8 December 4th, 2003 04:24 PM
Date in Access VBA (SQL) Kenny Alligood Access VBA 2 September 14th, 2003 08:35 AM
Access SQL/VBA help danielwajnberg Access 4 September 2nd, 2003 06:56 PM



All times are GMT -4. The time now is 01:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.