Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: SQL
Divers
Thread ID:
00257397
Message ID:
00257423
Vues:
14
>Sherry, it's fine putting an SQL in a memo field and executing it later as you are doing, but remember there cannot be any tab characters and especially a line (carriage) return. The most common mistake I've seen is not removing the last line return of the statement. Hope this helps.

Tabs (CHR(9)) are OK - they're treated as whitespace during macro-expansion if not enclosed within string delimiters, and are literal characters in a string. The semicolon continuation character, CR (CHR(13)) and LF (CHR(1)) characters used to break the statement into a multiline statement are, as noted in my message. Embedded CR and LF characters within a string will break macro execution:

cTest = 'foo = "[abc' + CHR(13) + CHR(10) + 'def]"'
&cTest && breaks
cTest = 'foo = "[abc' + SPACE(2) + 'def]"'
&cTest && works
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform