var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Error storing varchar with apostrophe
I'm getting the following error when I try to store
the name Wendy O'Leary (the name is entered via a text box on an ASP page)
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near 'leary'.
Posted Data is
Any help would be greatly appreciated
I've encountered similar problems in VB/Access.
Here is the simplest workaround:
Change all "'" to "`" before updating/searching the database.
It looks almost the same but doesn't generate an error.
Some databases understand two single quotation marks and will insert/search correctly using O''Leary.
The users will probably not remember to enter O''Leary when searching.
You should use the replace function in visual basic ( or a similar function in another programming language).
newstring = replace(oldstring,"'","''")