hi, i'm trying to insert quotes into sql database, i get an exception because it's a part of the sql query.. can anyone help me? thank's jony
rs.open "SELECT * FROM whereever", myconn, 3, 3 rs("textfield") = server.htmlencode(textstring) rs.update rs.close
Use replace function !!! e.g. Dim fixedstring as String = "yugolancer's reply sux" fixedstring = fixedstring.Replace("'", "''") Dim sql As String = "INSERT INTO table (column1) VALUES ('" & fixedstring & "')" etc. Code (markup):
You can use replace function to change quotes to html code, for example string=replace(string, chr(34), """, 1, -1, 1) Code (markup):
I am sure All the above answers would work, but what is the exact function that you require More info about your SQL server and language used can help???