SQL Query String
Posted on 2001-06-27
I have this problem.
when i made a SQL string query example:
set rst = new recordset
rst.open "select * from table where field = 'ABC'", ConnStr, adOpenStatic, adLockReadOnly
Note that the criteria "ABC" is retrieved from user input. The qns is, if the user input "AB'C", my query string will have error as the string will end till "AB" and the other statements will be invalid.
How am i going to resolve this?
Is there any other special characters which will caused this problem?