Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The infamous
Message
 
To
03/02/2005 13:51:20
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00983569
Message ID:
00983735
Views:
17
>
>SELECT Cs.fr, Cs.serial_no, cs.lotcontrol, Cs.prod_heat, Ml.mheat, Cs.custserid,;
>  Cs.codep, Cs.custpo, Cs.finalacpt, NVL(Sdata.codep,.F.) AS sd_codep,;
>  IIF(ISNULL(Mh_app.mheat),"NOT APPROVED","APPROVED        ") AS mhapproved,;
>  PADR(NVL(Sdata.sertype,"NON-SERIALIZED"),13," ") AS sertype,;
>  NVL(Seracpt.chkserial,.F.) AS except,;
> FROM ;
>     G:\SOFTWARE\SERIAL\custser Cs ;
>    LEFT OUTER JOIN G:\SOFTWARE\FOUNDRY\meltlog Ml ;
>   ON  Cs.prod_heat = Ml.prod_heat ;
>    LEFT OUTER JOIN sdata ;
>   ON  ( Cs.fr ) = Sdata.fr ;
>    LEFT OUTER JOIN seracpt ;
>   ON  ( Cs.fr ) = Seracpt.fr ;
>    LEFT OUTER JOIN frgroup ;
>   ON  ( Cs.fr ) = Frgroup.fr ;
>    LEFT OUTER JOIN mh_app ;
>   ON  ( Ml.mheat+Frgroup.group_no ) = ( Mh_app.mheat+Mh_app.group_no );
> WHERE  ( Cs.fr+Cs.serial_no ) = ( Opart.cpart+" "+Opart.cserialno );
>   AND  (  Cs.audbatid = ( Opart.naudbatid );
>   AND  Cs.lotcontrol = ( Opart.clotcontrol ) );
> ORDER BY cs.custserid desc
>
>Any suggestions, anyone?

oPart is not a cursorname within the SQL of the view, so for a view, vfp needs to know that those oPart.xxxxx's are parameters.

So for a view, you should change all oPart.xxxxx to ?oPart.xxxxx
(Although I would use variable names (without the dot) and create and fill these variables before you open or requery the view.

hth,
Frank Camp
Previous
Reply
Map
View

Click here to load this message in the networking platform