torturedmind
Programmer
hi all! been a while since i visited this great forum.
anyways, i have this prob that i can't seem to find my way out. here's part of the code that's producing the problem:
the problem is in the APPEND GENERAL command where it won't update the data of the graph. it runs ok on my development pc but not on a production pc. i even put the STRTOFILE function in the end to see if it's really getting the correct data which it does. this is in vfp6 and runs on both win98se or winxp sp2.
i've been working on this for 3 days now and i really don't know what to do with it. thanks in advance.
kilroy![[knight] [knight] [knight]](/data/assets/smilies/knight.gif)
philippines
"Once a king, always a king. But being a knight is more than enough."
anyways, i have this prob that i can't seem to find my way out. here's part of the code that's producing the problem:
Code:
SELECT wipsumtmp1.wip_io, ;
'D' + RIGHT(DTOS(wipsumtmp1.gen_date), 4) + wipsumtmp1.gen_time AS wip_dt, ;
SUM(wipsumtmp1.qty) AS qty ;
FROM wipsumtmp1 ;
GROUP BY wipsumtmp1.wip_io, 2 ;
ORDER BY wipsumtmp1.wip_io, wipsumtmp1.gen_date, wipsumtmp1.gen_time ;
WHERE CTOT(TRANSFORM(wipsumtmp1.gen_date) + ' ' + STUFF(wipsumtmp1.gen_time, 3, 0, ':')) >= (DATETIME() - (60*60*24)) ;
INTO CURSOR wipsumtmp2
[COLOR=green]***** PERFORM CROSSTAB QUERY *****[/color]
DO vfpxtab WITH 'wipxtab', .F., .F., .T., 1, 2, 3
[COLOR=green]***** COMPILE TIME DEFINITIONS OF ENTER, CARRIAGE RETURN, AND TAB KEYS *****[/color]
#DEFINE k_crlf (chr(13) + chr(10))
#DEFINE k_tab chr(9)
[COLOR=green]***** GET THE FOUR RIGHT-MOST CHARACTERS OF THE SELECTED FIELD NAMES *****[/color]
SELECT wipxtab
FOR f = 2 TO FCOUNT()
cGraphData = cGraphData + k_tab + RIGHT(FIELD(f), 4)
ENDFOR
[COLOR=green]***** GET THE DATA TO PLOT *****[/color]
GO TOP
SCAN ALL
cGraphData = cGraphData + k_crlf + wipxtab.wip_io
FOR f = 2 TO FCOUNT()
cGraphData = cGraphData + k_tab + ALLTRIM(TRANSFORM(EVALUATE(FIELD(f)), '999999999'))
ENDFOR
ENDSCAN
[COLOR=green]***** UPDATE GRAPH TABLE *****[/color]
USE ('c:\wipgraph.dbf') IN 0
SELECT wipgraph
APPEND GENERAL wipgraph.graph_view DATA cGraphData [COLOR=red]<--- This doesn't work.[/color]
STRTOFILE(cGraphData, 'C:\graphdata.txt')
i've been working on this for 3 days now and i really don't know what to do with it. thanks in advance.
kilroy
![[knight] [knight] [knight]](/data/assets/smilies/knight.gif)
philippines
"Once a king, always a king. But being a knight is more than enough."