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