|
-
January 11th, 2000, 08:54 PM
#1
SQL Field Error...
Here is a tip.
Public Sub RepairModule()
' Leo Koach (1999)
' This module takes out the "'" for SQL searches.
X = 0
Do
X = InStr(X + 1, inp, "'")
If X = 0 Then Exit Do
inp = Left(inp, X) & "'" & Right(inp, Len(inp) - X) ' inp = <text>
X = X + 1
Loop
End Sub
At least this is the way I do it.
Antbody has better ideas?
www.openplace.com
-
January 12th, 2000, 02:45 AM
#2
Re: SQL Field Error...
Use the VB6 Replace$ function and replace ' with '' that way the query will work.
Crazy D @ Work :-)
-
January 12th, 2000, 02:45 AM
#3
Re: SQL Field Error...
if you are trying to replace single quotes with two single quotes:
search = replace(search, "'", "''")
requires VB 6
-
January 12th, 2000, 02:53 AM
#4
Re: SQL Field Error...
cool, same answer at the exact same time! :-)
-
January 12th, 2000, 07:33 AM
#5
Re: SQL Field Error...
I wrote lots of programs I even sold most of them, I considered myself a professional, but...
The small things like that make me think. I know too little.
I have long ways to go still.
Thanks friends.
Leo
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
|