|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Dealing with apostrophes in an SQL string
<i><b>Originally posted by : Ted (TidyTed@yahoo.com)</b></i><br />Does any one have any ideas about handling apostrophes in an SQL string. I don't want to use the replace(xxxxx, "'", "''") method so do I have to insert the data using the command object?<br /><br />Thanks <br /><br />Paul<br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : tom (tom_lannoo@usa.net)</b></i><br />Two examples : <br /><br />sql="Select * from table where var='2'"<br /><br />or<br /><br />sql="Select * from table where var=" & chr(39) & "2" & chr(39)<br /><br />Between the double quotes of the sql string you can just use single quotes, who r going to be used as double quotes.<br /><br />Tom<br /><br /><br /><br />------------<br />Ted at 9/4/2000 7:39:15 AM<br /><br />Does any one have any ideas about handling apostrophes in an SQL string. I don't want to use the replace(xxxxx, "'", "''") method so do I have to insert the data using the command object?<br /><br />Thanks <br /><br />Paul<br />
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > Dealing with apostrophes in an SQL string |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|