Results 1 to 2 of 2
2006-03-21, 09:45 #1
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: ADO and Access query wildcards (2000/XP)
Thanks, I'm sure this will help others - the difference can be bewildering!
2007-10-22, 23:09 #2
- Join Date
- Jan 2001
- Manchester, Gtr Manchester, England
- Thanked 0 Times in 0 Posts
ADO and Access query wildcards (2000/XP)
Edited by HansV to update URL and make it clickable - see <!help=19>Help 19<!/help>
This isn't a question but the solution to a problem I had earlier today.
I've had a quick search and didn't find anything here but apologies if I didn't look hard enough and this info is duplcated elsewhere in the lounge.
I was opening a recordset in code using ado but it was returning EOF = True. The query forming the source of the recordset definitely contained records.
I eventually realised this was because the WHERE criteria in the query contained the wildcard symbol * and ADO requires %.
Changing the * to % in the query returned the correct number of records in the recordset.
BUT opening the query from the databse window returned nothing <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15>
Eventually found this article Using the Right Wildcard Characters in SQL Statements
And discovered changing the word 'Like' to 'ALike' allows the use of the ADO wildcard in the Access query grid <img src=/S/mice.gif border=0 alt=mice width=50 height=25>