TransBind
asked on
single quote ASCII
I am trying to pass to an update SQL statement a textfield value which might contain a single quote and this generate an error.
How can I convert a single quote into an ASCII character in a string "adfd ' fd". Basically I would like to go through every character in a string and convert single quote character into a special character that will be accepted by SQL.
How can I convert a single quote into an ASCII character in a string "adfd ' fd". Basically I would like to go through every character in a string and convert single quote character into a special character that will be accepted by SQL.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try this..also..
strSQL="insert into table_name values"strSQL=strSQL & "(NAME='"strSQL=strSQL & replace(request("NAME"),"' ","''") & "'," & request("DoB") & ")"In the above example if the value of the name field contains a single quote it will be replaced with two single quotes.
R.K
strSQL="insert into table_name values"strSQL=strSQL & "(NAME='"strSQL=strSQL & replace(request("NAME"),"'
R.K
ASKER