|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
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
|
|||
|
|||
|
How to insert text that contains an apostrophe??
Hi there,
I have an access 2000 db and in one of my tables I need to store some text that sometimes contains an apostrophe. My problem is, everytime my program tries to insert text containing an apostrophe, the program crashes... The insert statments I am using look like this: CurrentDb.Execute "INSERT INTO myTable (Text) VALUES ('" & stringContainingApostrophe & "')" I've tried checking the text for apostrophes and replacing them with an ecape character + apostrophe ("\'") but that doesn't work either... It seems like I should be able to store text that contains an apostrophe... Am i missing something here? Does anyone have any ideas?? (Thanks in advance) |
|
#2
|
||||
|
||||
|
replace each apostrophe with two
Code:
insert into foo (name) values ('duncan o''toole')
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > How to insert text that contains an apostrophe?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|