Forums
This topic is locked
Can anyone help on this?
25 Apr 2002 00:34:03 Dan Slade posted:
Hi,I have a text box on a form that inserts text into a table. When the user
puts double quotes (" in the text field it throws up the following error:
ADODB.Connection.1 error '80004005'
SQLState: S1090
Native Error Code: 0
[TCX][MyODBC]SQLBindParameter not used for all parameters
I replaced all the " in the text with ' and it submits fine.
I am using asp with a MySQL database
I have two questions.
1, does anyone know why it is doing this, and how I could get round it?
If not,
2, Is there a way of replacing certain characters before it throws up the
error?
Please can someone help me out on this, it's driving me mad...
Cheers.
Replies
Replied 25 Apr 2002 14:21:10
25 Apr 2002 14:21:10 Andrew Watson replied:
before the insert happens grab the field and replace the quotes.
ie.
<pre id=code><font face=courier size=2 id=code>
<% varString = Replace(Request.Form("YourField", chr(34), "'" ) %>
</font id=code></pre id=code>
then insert varString instead of what was in the text fields...
Cheers
:: Son, im Thirty.... ::
ie.
<pre id=code><font face=courier size=2 id=code>
<% varString = Replace(Request.Form("YourField", chr(34), "'" ) %>
</font id=code></pre id=code>
then insert varString instead of what was in the text fields...
Cheers
:: Son, im Thirty.... ::