|
-
Feb 13th, 2000, 11:58 AM
#1
Thread Starter
Lively Member
Example SQL statement:
txtTitle.Text = "Frame's"
"SELECT Titles as intTitle WHERE Title = '" & txtTitle.Text & "'"
It gives me an error referring to the single quotation in Frame's.
I tried replacing the Frame's with Frame\'s and even Frame/'s but it still didn't like it. If I remove the single quote then it behaves properly!
How can I fix this? I would like NOT to eliminate single quotes from my database!
Thanks in advance!
<c>
-
Feb 13th, 2000, 02:11 PM
#2
Guru
Use 2 single quotes in place of a double quote
If you have VB6, you can use the REPLACE function to easily do this for you
-
Feb 14th, 2000, 08:59 AM
#3
Thread Starter
Lively Member
Maybe I didn't make myself clear...
User wants to search for an item in the database.
The item is Frame's, so they type frame's.
But it doesn't return frame's because of the single quotation or apostrophy or whatever it's called.
My question is how do I allow them to search for something that has a single quote in it.
<c>
-
Feb 14th, 2000, 01:47 PM
#4
Guru
Sorry, I mistyped
Use two single quotes instead of one single quote when searching
...Just try it
-
Feb 14th, 2000, 09:30 PM
#5
Thread Starter
Lively Member
Thanks, Clunietp.
Seems to be working fine now.
<c>
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
|