Error on SetParameter in ODBCResultSet

Dear All,

I have problem when I try to add record to MySQL Database using ODBCResultSet if value of parameters of I add contain single quote

city & name are parameters that I set in sqlscript :

“insert into user(name,city) values (?name?,?city?)”

Here is part of scripts

ODBCResultSet.SetParameters(name,“'”&namevalue&“'”)

ODBCResultSet.SetParameters(city,“'”&cityvalue&“'”)

Then I execute using method ODBCResultSet.Execute

If namevalue and cityvalue contain single quote like john’ and new york '. Lotus Notes results error on running sqlscript.

But If no contains any single quotes, It run properly.

How to solve this problem if I want to add some values that contain single quote ?

Thanks

Best Regards,

Hedi

Subject: Error on SetParameter in ODBCResultSet

Try to preceed a single quote with the Notes special character indication: backslash (). This works for the search string in NotesDatabase.Search too.