Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Apostrophe check
Message
From
28/01/2003 12:48:41
 
 
To
28/01/2003 10:36:37
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00746206
Message ID:
00746293
Views:
22
>Function SQLApostropheCheck(strCheckString As String) As String
> If strCheckString = "" Then
> SQLApostropheCheck = ""
> Else
> SQLApostropheCheck = Replace(strCheckString, "'", "''")
> SQLApostropheCheck = Replace(strCheckString, "&", "&&")
> End If
>End Function
>
>
>Hi,
>
>The function above does not seem to deal with a single quote.
>ie: if strCheckString = TEST' ORDER
>Any ideas?
>
>Thanks.
>
>Alvin

Try this :
Replace(strCheckString, CHR(39), CHR(39)&CHR(39))
Wine is sunlight, held together by water - Galileo Galilei
Un jour sans vin est comme un jour sans soleil - Louis Pasteur
Water separates the people of the world; wine unites them - anonymous
Wine is the most civilized thing in the world - Ernest Hemingway
Wine makes daily living easier, less hurried, with fewer tensions and more tolerance - Benjamin Franklin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform