|
-
January 18th, 2000, 05:56 AM
#1
Single Quote Problem.....HELP
Hi all,
I have this problem with single quotes in my program. I have a name ie. D'Souza and when i use an update statement to enter any data into my database i get an error due to the conflict in the update statement.
eg : Sql = "Update employees set employeeFirstname=' "& text1.text &" ',etc..etc"
So since i have a single quote in the sql, it conflicts with the single quote in the name D'Souza and gives me the error.
I would be grateful if you guys out there could help me out with this, thanks alot in advance.
Derek
-
January 18th, 2000, 06:03 AM
#2
Re: Single Quote Problem.....HELP
Make the single quotes ' to 2 single quotes '' ... If you have VB6, you can easily use the Replace$ function:
s = Replace$(s, "'", "''")
This should work (at least it does for me)
Crazy D @ Work :-)
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
|