<i><b>Originally posted by : PCalabria (PCalabria@pcenterprises.com)</b></i><br />I'm trying to update a character field in my access database with a string that contains a sinqle quote. VB sript doesn't mind the quote at all, strBookList="Pat's", but when I try to add the line to an SQL UPDATE statement, all hell breaks loose because strings need to be surrounded with single quotes.
<i><b>Originally posted by : Jason</b></i><br /><br />use this to replace all single quotes, so sql will not think that it's the start or end of a value constant. <br />strBookList = replace(strBookList,"'","''")<br /><br />------------<br />PCalabria at 6/5/2000 1:55:43 PM<br /><br />I'm trying to update a character field in my access database with a string that contains a sinqle quote. VB sript doesn't mind the quote at all, strBookList="Pat's", but when I try to add the line to an SQL UPDATE statement, all hell breaks loose because strings need to be surrounded with single quotes.
Was this answer helpful ?
Yes No