JUST AN ACCESS SELECT STATEMENT
-
response.write(Searchvar) SQL = "SELECT * FROM MYDB WHERE DESCRIPTION LIKE '*"Searchvar"*'" The response.write(Searchvar) returns the correct text i.e. ARTICLE BUT my SQL statement returns the FULL DB every time? Where is my SELECT statement going wrong? Just wnat to limit the result to all records with the string ARTICLE in the DESCRIPTION TABLE. i.e. IF the field is "THIS ARTICLE IS BLUE" it should display that record this is me
-
response.write(Searchvar) SQL = "SELECT * FROM MYDB WHERE DESCRIPTION LIKE '*"Searchvar"*'" The response.write(Searchvar) returns the correct text i.e. ARTICLE BUT my SQL statement returns the FULL DB every time? Where is my SELECT statement going wrong? Just wnat to limit the result to all records with the string ARTICLE in the DESCRIPTION TABLE. i.e. IF the field is "THIS ARTICLE IS BLUE" it should display that record this is me
Are you really sure that this code is runnable at all? You really should get a syntax error trying to run it. You have forgotten the & operator for concatenating the strings: SQL = "SELECT * FROM MYDB WHERE DESCRIPTION LIKE '*" & Searchvar & "*'" --- b { font-weight: normal; }