Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT * FROM and the apostrophe
Message
De
15/10/1999 02:57:49
Larry Santos
Local Data System
Philippines
 
 
À
14/10/1999 19:27:05
Information générale
Forum:
Visual Basic
Catégorie:
VBScript
Divers
Thread ID:
00276634
Message ID:
00276723
Vues:
25
use chr() instead...

>Hello!
>I got a problem using apostrophe in the fields, upon I need to search a data I got error because the data has apostrophe, here is a example:
>cVar="Bob's Sample"
>cSearch="SELECT * FROM CUSTOMER WHERE BusinessName= '"&cVar&"'"
>MyData.Open cSearch, objCmd, adOpenKeyset, adLockOptimistic, adCmdText
>
>At this time I got error because the apostrophe, and if I try to not use apostrophe after BusinessName I got other error because it is a character and need the apostrophe.
>Any advice or suggestion.
>
>Thanks,
>
>Gerardo
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform