Hello all!
i have a page where a user can type freely whatever he or she desires and it gets written to an access database via the Microsoft.Jet.O LEDB.4.0 connection using the following sql statement
this works fine and enters the values into the database. The problem i face is when a user enters a ' sign. for example if a user was to write. " slider's car is the best " the ' sign in slider will cause an error stating the following "Syntax error (missing operator) in query expression"
i havnt come up with any idea of how to counteract this and im hoping someone here will.
i can see why the problem occurs its just on how to fix it i am lost.
Thanks
i have a page where a user can type freely whatever he or she desires and it gets written to an access database via the Microsoft.Jet.O LEDB.4.0 connection using the following sql statement
Code:
sSQLB = "Update Profile SET txt1 = '" & txt1 & "', txt2 =' " & txt2 & "', txt3 = '" & txt3 & "', txt4 = '" & txt4 & "', txt5 = '" & txt5 & "' where USER_ID = " & USER_ID & ""
i havnt come up with any idea of how to counteract this and im hoping someone here will.
i can see why the problem occurs its just on how to fix it i am lost.
Thanks
Comment