Hi,
I'm trying to execute a SP with parameters. All work fine until i put a ' or a " as part of the input field.
Example:
SQLStmt = "EXEC sp_master_no @acc_no = '3000/001'," + '@name = ' + "'" + Thisform.s_name.value + "'"
EXEC(1,SQLStmt) <-- Will fail if user key-in ' or " as part of the s_name textbox field.
What should i do here if i wich to allow the ' or " to be inserted into the MSSQL database ?
Thanks
I'm trying to execute a SP with parameters. All work fine until i put a ' or a " as part of the input field.
Example:
SQLStmt = "EXEC sp_master_no @acc_no = '3000/001'," + '@name = ' + "'" + Thisform.s_name.value + "'"
EXEC(1,SQLStmt) <-- Will fail if user key-in ' or " as part of the s_name textbox field.
What should i do here if i wich to allow the ' or " to be inserted into the MSSQL database ?
Thanks