nvwildfire
Technical User
Hey list, I've got a problem that is just killing me. I am using ASP 3.0 and connecting with an access 2000 database with ADO. The problem is in my SQL statement. I know this because I am not getting any records returned (i.e. objRS.EOF and objRS.BOF). Here is the SQL statement:
strSQLS = "SELECT tblCache.NFES, tblCache.Description FROM tblCache "
strSQLS = strSQLS & "WHERE ((Description) like '*' & 'jean' & '*')"
Here is the ADO Request:
objRsSearch strSQLS, objConn
If I copy this statement straight into the sql view of a query, 23 records are returned. Just to check I changed the WHERE clause to NFES = 141 and it works fine via ASP (the NFES field is a number field). I am sure it has something to do with the single quotes (') or maybe its the wildcard (*) I don't know. I have also used response.write to print the strSQLS statement to the browser to see if anything weird is coming up and it looks fine (also have pasted the results of the response.write into the access sql view and it works fine).
Anyway any help would be greatly appreciated.
Thank you in advance
strSQLS = "SELECT tblCache.NFES, tblCache.Description FROM tblCache "
strSQLS = strSQLS & "WHERE ((Description) like '*' & 'jean' & '*')"
Here is the ADO Request:
objRsSearch strSQLS, objConn
If I copy this statement straight into the sql view of a query, 23 records are returned. Just to check I changed the WHERE clause to NFES = 141 and it works fine via ASP (the NFES field is a number field). I am sure it has something to do with the single quotes (') or maybe its the wildcard (*) I don't know. I have also used response.write to print the strSQLS statement to the browser to see if anything weird is coming up and it looks fine (also have pasted the results of the response.write into the access sql view and it works fine).
Anyway any help would be greatly appreciated.
Thank you in advance