|
-
Oct 31st, 2007, 05:46 AM
#1
Thread Starter
Frenzied Member
How to exclude ' or chr(39) from sql statement
Hi There,
I have an SQL command which i have build up, and the SQLfieldname are simply strings which I have built up by
chr(39) & strWhatever & chr(39)
the problem is when strWhatever contains the ' or chr(39) and that causes an error on my SQL, how do i exclude the ' in the variable besides just replacing it with another character?
cheers
str = "INSERT INTO WhateverTable (" & SQLfieldname & ")"
str &= " VALUES (" & SQLfieldvalue & ")"
If you find my thread helpful, please remember to rate me 
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
|