>_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 tmpBut 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.