01-22-2014 02:47 PM
We are using ACCESS 2007.
I am not able to use the wildcard(*) in my script:
Exemple:
sprintf(myQRY,"SELECT tablename.col1 FROM table.name WHERE tablename.col1 Like '%s' ",mystring); mystring="aa*"
tablename.col1
aa000001
aa000002
bb000001
The result I expect is: aa00001, aa00002
I get no records: It seems that the wildcard * is not recognize. I tryied %,_ still doesn't work: When I try myQRY in ACCESS it works.
Do you have an exemple using the wildcard
01-23-2014 10:20 AM
JTTest1997,
You could try to use this command:
SELECT tablename.col1 FROM table.name WHERE tablename.col1 Like ´aa*´
Please take a look to this page.
01-24-2014 08:30 AM
DataHandle1 = DBConnect ("DSN=MANUF");
sprintf(StrQry, "SELECT Box_Number,Closed FROM tblBOX WHERE (((tblBOX.Box_Number) Like '*'));");
StatHandle1 = DBActivateSQL (DataHandle1,StrQry);
numRec = DBNumberOfRecords (StatHandle1);
Still doesn`t work. Even if have data in the tblBOX.Box_Number, I get numRec=0.
It seems that it interpret the * as a caractere instead of a wildcard
An I am connected to the right tblBox table because I am able to add data to the tblBOX.Box_Number column