|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
sinqle quotes in SQL statements
<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.
|
|
#2
|
|||
|
|||
|
<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.
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > sinqle quotes in SQL statements |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|