Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C000008E when View Opened in EXE
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00441851
Message ID:
00441855
Views:
8
>Below is the code from my view (which is defined in the DBC).
>
>If I'm in the development environment, the form I'm using with this view works great!! But once compiled and ran as an EXE, the form throws the C8E error when this view is opened. I had it in the DE at first, dropped it from there and put code in the Load to open it and it still crashes on the Use doc!casem1 line.
>
>The development environment is w2k with vfp6 sp4. The crash happens on this machine and I tried it on a win98 with the same result from the exe.
>
>Help please
>
>
>SELECT Inv.category AS resourcetype, Inv.name AS description,;
> AVG(Invhis.qty) AS avgqty, Inv.catno AS catno, Inv.immsfld AS imms,;
> Invhis.itemnumber AS itemno, COUNT(Invhis.qty) AS cntqty,;
> Invhis.pccost AS pccost, Inv.wholesale/Inv.cf AS invunitcost,;
> IIF(EMPTY(Invhis.pccost),(Inv.wholesale/Inv.cf)*AVG(Invhis.qty),(pccost*AVG(Invhis.qty))) AS extcost,;
> IIF(.NOT.EMPTY(Invhis.pccost),Invhis.pccost,Inv.wholesale/Inv.cf) AS unitcost,;
> ROUND(CNT(Invhis.qty)/gncasecnt,3) AS avg1;
> FROM doc!invhis INNER JOIN doc!inv ;
> ON Invhis.itemnumber = Inv.itemnumber;
> WHERE Invhis.proccode = ?gcProcID;
> AND Invhis.pxdate BETWEEN ?mq_start AND ?mq_end;
> AND Invhis.qty > -1;
> GROUP BY Invhis.itemnumber;
> ORDER BY Inv.category, Inv.name

Do any of the denominators in your SELECT statement (ie. Inv.cf) have 0 or NULL values in them? If not, whenever I have troubles with views, I start with a simple statement and build from there.
Chris McCandless
Red Sky Software
Previous
Reply
Map
View

Click here to load this message in the networking platform