Hello all,
I have an ASP page with a <textarea> on it that is posting the contents of the <textarea> into an Access database. When the form on the page is processed, the following code is used before putting the information into the database:
var mytextarea = Request("mytextarea")+"";
mytextarea = mytextarea.replace("'", "''");
This is supposed to deal with the single quotes before the INSERT query The problem is that it only works if mytextarea has one quote. If there are more than one quote in mytextarea, I receive the following error:
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''Isn''t it funny this doesn't work'
Anyone know how to replace multiple instances of single quotes?
Thanks in advance