You can use the Replace() function to replace all occurrences of a single
quotation mark with *two* single quotation marks:
To borrow Bryan's example:
Dim myVal
myVal = "Person's name"
myVal = Replace(myVal, "'", "''")
'now store it in the database
This will store it in the database with an embedded apostrophe. This
doesn't answer your question about ignoring it, but gives you a potential
alternative.
Quote:
> Hi,
> I have a web page that retrieves user input and updates an
> sql databased using ASP page. But everytime the text input
> field includes an aprostophe it gives the error message:
> Microsoft OLE DB Provider for ODBC Drivers
> error '80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:
> Incorrect syntax near 't'.
> /IHealthlogs/submitfault.asp, line 23
> If there is an aprostophe within the input string it is
> picked up as part of the code.
> IS there a code to totally ignore the string?
> please help
> thanks in advance
> Nuve