WIN XP SP2 - VFP6
The code below is a section from an EPOS system which has been working at 3 seperate locations for over 6 years.
The client reported that 1 of the machines is falling over.
As I work some distance from his site, I sent him a test version of the app in which I inserted wait windows throughout this section.
The error occurs when the highlighted query is run.
All the versions of the app were installed from the same set up disks.
The only other possible difference is that the machine with the error has additional programs and apps installed but the VFP app has been re-installed from the original disk and is identical to the other machines.
DAYSALES, ASTOCK and other tables are accessed successfully throughout the rest of the application with no problems.
Could something external to the program be preventing the query from running?
I realise that faults of this nature can be difficult to resolve but would welcome any suggestions as to what may be the cause.
Keith
The code below is a section from an EPOS system which has been working at 3 seperate locations for over 6 years.
The client reported that 1 of the machines is falling over.
Code:
error - file access denied
The error occurs when the highlighted query is run.
All the versions of the app were installed from the same set up disks.
The only other possible difference is that the machine with the error has additional programs and apps installed but the VFP app has been re-installed from the original disk and is identical to the other machines.
DAYSALES, ASTOCK and other tables are accessed successfully throughout the rest of the application with no problems.
Could something external to the program be preventing the query from running?
I realise that faults of this nature can be difficult to resolve but would welcome any suggestions as to what may be the cause.
Code:
IF LASTKEY()=13
SELECT ASTOCK
SET ORDER TO CODE
SELECT DAYSALES
SET ORDER TO CODE
COUNT ALL FOR DAYSALES.CODE=ALLTRIM(THIS.VALUE) TO HOWMAN
IF HOWMAN>0
REFCODE=ALLTRIM(THIS.VALUE)
SELECT ASTOCK
SEEK REFCODE
IF FOUND()
TYTL="Listing for "+ASTOCK.PRODUCT
ELSE
TYTL="Product not found."
ENDIF
SELECT DAYSALES
SET ORDER TO SALE_NUM
THISFORM.LINE_DETS.VISIBLE=.T.
[red]
SELECT DAYSALES.DATE,DAYSALES.TIME,DAYSALES.CODE,ASTOCK.PRODUCT,DAYSALES.QTY,;
DAYSALES.EACH;
FROM Z:\ASTOCK.DBF ASTOCK INNER JOIN Z:\DAYSALES.DBF DAYSALES ON ASTOCK.CODE = DAYSALES.CODE;
WHERE (DAYSALES.CODE=REFCODE);
ORDER BY DAYSALES.DATE;
INTO CURSOR KEEFY
SELECT KEEFY
[/red]
GO BOTTOM
BROW
RDATE=KEEFY.DATE
RCODE=KEEFY.CODE
RPROD=KEEFY.PRODUCT
RPRIC=KEEFY.EACH
RQTY=KEEFY.QTY
THISFORM.REFRESH
ELSE
THISFORM.LINE_DETS.VISIBLE=.F.
=MESSAGEBOX("No Items with code "+ALLTRIM(THIS.VALUE)+" in table")
ENDIF
ENDIF
Keith