I have code that looks like this:
Dim Cmd As OleDb.OleDbCommand
Dim Data As OleDb.OleDbDataReader
with Cmd
.Connection = _Conn
.CommandText = "SELECT * FROM Operators WHERE OperatorID='" &
Me._OperatorID & "'"
Data = .ExecuteReader
end with
This works fine for as lond as the patameter Me._operatorID does not contain
an apostrophe ("'") - , for example a name like O'Brien would cause an
error.
How can i go around this problem of solve it.
Thanks in advance