-
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
-
Re: SQL Field Error...
Use the VB6 Replace$ function and replace ' with '' that way the query will work.
Crazy D @ Work :-)
-
Re: SQL Field Error...
if you are trying to replace single quotes with two single quotes:
search = replace(search, "'", "''")
requires VB 6
-
Re: SQL Field Error...
cool, same answer at the exact same time! :-)
-
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