D
David Bird
I am attempting to build a command string to update a field in a dataset.
the command string looks like this:
Dim cmdString As String = "Update [data table] set lName = '" & clName.Trim
& "', fName = '" & cfName.Trim & "' Where id = " & lnID
the command works fine unless and until clname and/or cfname contains an
apostrophe, ie: O'Hare
When the executeNonquery is run, the quotes are out of balance and a syntax
error is thrown.
How can I build a command to update a field where it has apostrophes? I
can't find any way to change delimiters, like using brackets around the
variables [O'Hare] instead of a single tick.
thanx.
daver
the command string looks like this:
Dim cmdString As String = "Update [data table] set lName = '" & clName.Trim
& "', fName = '" & cfName.Trim & "' Where id = " & lnID
the command works fine unless and until clname and/or cfname contains an
apostrophe, ie: O'Hare
When the executeNonquery is run, the quotes are out of balance and a syntax
error is thrown.
How can I build a command to update a field where it has apostrophes? I
can't find any way to change delimiters, like using brackets around the
variables [O'Hare] instead of a single tick.
thanx.
daver