Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Not able use a view ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00229705
Message ID:
00229710
Vues:
25
>I have a program that is not been transfered to OOP yet. It generates commission amounts and then prints out too much paper. No data interaction, just give a date and print.
>
>
>So a mega union view that joins our ar history file with a current ar transaction file works fine in a VFP command session or running the program from the command line. But compile the app to an EXE and it's a no go.
>
>Error message is : File does not exist.
>
>Line of code is the use lv_invoice_details
>
>
>wait wind 'use lv_invoice_details'
>use lv_invoice_details in 0
>
>sele lv_invoice_details
>
>wait wind ' lv_invoice_details replacements in'
>replace cshipno with right(alltrim(ponum),4) for cshipno='POOL'
>replace item with right(alltrim(item),3) for item='PRICING_ADJ'
>replace item with substr(item,8,6)+'REWORK' for item='REWORK'
>
>
>If I ignore, the next error is:
>Alias not found (sele lv_invoice_details)
>
>
>From the command window no problem to issue the same line of code. all other views are fine, a total of 5 have been opened prior to this.
>
>here is the view SQL:
>CREATE SQL VIEW "lv_invoice_details" as ;
>SELECT Armast01.custno, Armast01.cshipno, artran01.item, artran01.descrip,;
>armast01.invno,;
>(artran01.qtyshp) as shipped, ;
>(artran01.extprice) as price, ;
>artran01.salesmn, artran01.terr, armast01.ponum, artran01.invno, artran01.invdte , artran01.lineno ;
> FROM f:\pro30\ardata\armast01 INNER JOIN f:\pro30\ardata\artran01 ;
> ON Armast01.invno = Artran01.invno ;
>where (Iarclss ='34' or item='PRICING_ADJ' or item='DISP_DISC_CTR' or item='DISPLAY_COST' or item='RE' );
>and empty(armast01.current) ;
>and ctod(armast01.invdte) >= mdate1;
>and ctod(armast01.invdte) < gomonth(mdate1,1);
>union ;
>SELECT arymst01.custno, arymst01.cshipno, arytrn01.item, arytrn01.descrip, ;
>arymst01.invno,;
>(arytrn01.qtyshp) as shipped, ;
>(arytrn01.extprice) as price, ;
>arytrn01.salesmn, arytrn01.terr, arymst01.ponum, arytrn01.invno, arytrn01.invdte, arytrn01.lineno ;
> FROM f:\pro30\ardata\arymst01 INNER JOIN f:\pro30\ardata\arytrn01 ;
> ON arymst01.invno = arytrn01.invno ;
>where (Iarclss ='34' or item='PRICING_ADJ' or item='DISP_DISC_CTR' or item='DISPLAY_COST' or item='RE');
>and ctod(arymst01.invdte) >= mdate1;
>and ctod(arymst01.invdte) < gomonth(mdate1,1)
>
>TIA

I don't know what the real problem here, but IMHO the using of cursor would be more appropriated here, and would just simplify this case to the extent that error will disappear itself :-).
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform