Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String too long to fit
Message
De
05/02/2007 13:50:20
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 5
Divers
Thread ID:
01192359
Message ID:
01192520
Vues:
13
>Hi all,
>
>I want to make a query from a long string but I get an error "string too long to fit". I was wondering how you are dealing with this in vfp 5. I have the following code:
>
>_text = fcreate("temp.txt")
>text
>Sum(vvp_pri) as vvp_pri,;
[SNIP]
>	sum(uitk_ao2) as uitk_ao2,;
>	sum(huitk_ao2) as huitk_ao2,;
>	ind_pvmak;
>endtext
>nSize =  FSEEK(_text, 0, 2)
>fseek(_text,0,0)
>cVelden = fread(_text,nSize)
>=fclose(_text)
>
>select cVelden from portefeuille_ulk_prov_pvp_prem_uitk7
>
The trouble is in the last line - it should be "select &cVelden from...", but even then, you may better use textmerge to make that into a .prg, with
set textmerge on
text to tmp.prg
select <<cVelden>> from portefeuille_ulk_prov_pvp_prem_uitk7
endtext
compile tmp.prg
do tmp
But under VFP5 you don't have the compile command - it was introduced in VFP6SP4, IIRC, so you'd have to run a macro at some point, and I'm not sure what were the limitations to a macro expanded code under VFP5. Just try "select &cVelden from...", if it works, OK, if not, just force the bosses to fork a few hundred bucks and upgrade straight to VFP9.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform