Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apostrophe check
Message
 
 
À
28/01/2003 10:36:37
Alvin Lourdes
Children and Youth Services Cluster
Toronto, Ontario, Canada
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00746206
Message ID:
00746293
Vues:
24
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform