|
-
Mar 27th, 2001, 06:55 AM
#1
Thread Starter
Hyperactive Member
I'm having problems using a wildcard in ADO, i do the following, any help welcome...
str.printf("Select STD, provincebid From PROVINCEB_IDENTIFY where STD like '%s*';",szTempTelCode);
rs2 = m_db->Execute(mlExecReadWrite,str);
szTempTelCode is number a like 20300, i then chop a character off each time in a while loop until for instance 203*. there are instances at theis poit but are not detected..
Gary
PS: This line however works direct in Access.
"Life isn't about finding yourself. Life is about creating yourself."
--George Bernard Shaw
-
Mar 27th, 2001, 10:03 AM
#2
Member
The wildcard * works in access, but in SQL server it is %, for example:
Select * from Table Where (Field LIKE 'd%')
not
Select * from Table Where (Field LIKE 'd*')
-
Mar 27th, 2001, 10:16 AM
#3
Thread Starter
Hyperactive Member
which
Whcih uses SQL ASP OR C++ i'm connectiing with the ADO object?
Gary
"Life isn't about finding yourself. Life is about creating yourself."
--George Bernard Shaw
-
Mar 27th, 2001, 10:25 AM
#4
Member
I don't understand your last question.
When using ADO with SQL Server, always use % as the wildcard instead of *.
Does this solve your problem.
Nialler
-
Mar 27th, 2001, 10:27 AM
#5
Thread Starter
Hyperactive Member
yep
yep... Access is the pain..
"Life isn't about finding yourself. Life is about creating yourself."
--George Bernard Shaw
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|