I've got a VFP8 application that is currently running though a Citrix Metaframe 'portal', but we saw the same problem when it was running on a Novell Network. Bear with me while I explain what's going on.
When a users initiates a 'batch', they give the application the batch number and a remit number range. Records are created in the remit detail file (remdet) when they hit 'Save' from the initial batch entry form and they are sent to the initial remit entry form
This initial remit entry form can be used for either initial entry or for verification entry and in the save method I have the following code.
If thisform.InitEntry && is this initial entry or verification
sele rementry && temp table, holds remit number & amt for batch
go top
scan
SCATTER memvar
m.batchseq = PADL(ALLTRIM(STR(RECNO())),3,'0')
SELECT remdet && Remit Detail table
SEEK m.remitno
IF FOUND()
GATHER memvar
else
INSERT INTO remdet FROM memvar
ENDIF
ENDSCAN
SELECT rembatch && Batch file
REPLACE inittot WITH thisform.txtIniTotal.Value, begindate WITH DATE(), beginusrid WITH muserid
thisform.Release() && send back to initial batch entry screen
else
&& do other stuff
What seems to be happening is that when the Scan hits the last record of the rementry file it is breaking out of the scan loop AND the IF branch. What we are seeing is that the last record of the rementry file is not being updated into the remdet file, in fact, it's completely disappearing.
I'd like to replace the scan loop with an Update SQL, but I can't get it to update more than one record at a time, and I need it to take the entire rementry file and update the remit detail file in one fell swoop.
Any ideas?
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place