|
-
August 16th, 2001, 08:25 AM
#1
Special Characters on SQL-statement
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>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|