Hi
I have an ASP page which accepts several address lines from text inputs. I have obvious problems if the user enters values contining apostrophes (') as they get passed to SQL Server as parameters for a stored proc, and the SQL falls over.
Is there a recognised way of parsing parameters, lumps of SQL etc. prior to passing over to SQL Server? I am currently thinking of using REPLACE (in VBS and/or SQL) to put in a ` where an ' occurs, or even to double up the ' chars to make them valid (although that gives probs by increasing the size of the text). Seems very laborious though, and there may be other such characters?
Many thanks for your help
Julian
I have an ASP page which accepts several address lines from text inputs. I have obvious problems if the user enters values contining apostrophes (') as they get passed to SQL Server as parameters for a stored proc, and the SQL falls over.
Is there a recognised way of parsing parameters, lumps of SQL etc. prior to passing over to SQL Server? I am currently thinking of using REPLACE (in VBS and/or SQL) to put in a ` where an ' occurs, or even to double up the ' chars to make them valid (although that gives probs by increasing the size of the text). Seems very laborious though, and there may be other such characters?
Many thanks for your help
Julian