Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT command, longer than 255 characters
Message
 
À
29/10/1998 02:41:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00152131
Message ID:
00152134
Vues:
25
>>Does anybody know how to execute a SELECT sentence longer than 255 characters from EXE application.
>>
>>I allow my users to pick a fields from list and then I make a SELECT sentence (something like a query maker )
>>
>>This is working just fine from VFP development
>>
>>SET TEXTMERGE TO myPrg
>>// some select syntax
>>SET TEXTMERGE TO
>>COMPILE myPrg
>>DO (myPrg)
>>
>>but from executable, this feature is not available, does anybody have some idea how to solve this problem
>>
>
>SQL select can go up to 2000+ characters, but you should probably build up a text-string variable instead of merging and compiling a .prg. It will perform better as well. Ex.:
>lcSel = "SELECT "
>lcSel = lcSel + "SomeFields" + " FROM "
>lcSel = lcSel + "SomeTables" + " WHERE "
>lcSel = lcSel + "Condition"
>&lcSel
>I do it that way and it works great.

Method suggested by Danijel is best.
That's the best way to go for any SQL statement.It not only provides a more than 255 characters SQL but also a flexibility to build any conditions and select tables at runtime as per the choice of user.

Aashish
--
--
Aashish Sharma
Tele Nos: +1-201-490-5405
Mobile: +91-9821053938
E-Mail:
aashish@aashishsharma.com
write2aashish@gmail.com

You better believe in yourself... if you don't, who else will ?
TODAY is a gift, that's why it's called PRESENT
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform