I have the following:


Dim SQL as string
...
SQL = "SELECT * FROM COMPANY WHERE NAME = '" & txtName.text &"'"
...
rstCompany = conOracle.OpenRecordset(SQL, dbOpenForwardOnly)




Works fine for my purpose until I encounter name with the '-character, for example d'Or. My ODBC call then fails because it assumes that I'm only looking for NAME = 'd' and that the Or' at the end is another part of the SQL statement that cannot be parsed.

Any solution or workaround GREATLY appreciated (and rated ;-)

Thanks

<i>If anything in this post makes sense it was written by me, if not I don't know who wrote it</i>