JasonGS
Jul 5th, 2000, 03:31 PM
Using VB6/ADO/Access MDB file...
I have a table that contains a field that [in some cases] will contain an apostrophe ' and when I try to query for the name O'BRIEN for instance with the following code...
adoRset.Open "SELECT * FROM table WHERE lastname = '" & txtLastName.Text & "' ORDER BY lastname", adoConn
I get an error of Syntax error (missing operator) in query expression 'employee LIKE '%O'BRIEN%''.... any ideas how to get around this problem?
I have a table that contains a field that [in some cases] will contain an apostrophe ' and when I try to query for the name O'BRIEN for instance with the following code...
adoRset.Open "SELECT * FROM table WHERE lastname = '" & txtLastName.Text & "' ORDER BY lastname", adoConn
I get an error of Syntax error (missing operator) in query expression 'employee LIKE '%O'BRIEN%''.... any ideas how to get around this problem?