Subject | Re: [IBO] loosing records Help |
---|---|
Author | Daniel Bertin |
Post date | 2002-01-10T09:07:54Z |
thanks, i'm breathing deeply but if I don't fix this my job is in jeapordy,
here is basically the code in a close event;
if Form.ModalResult = mrOK then
begin
datamodule1.IBOtable1.edit;
datamodule1.IBOtable1.fieldbyname('dumpdate').asdatetime := now;
if form3.MessageDlgPosSetFont('Is This Load Dumped?',mtConfirmation,
[mbYes, mbNo], 0, 200,200,'MS Sans Serif',18,[fsbold]) = mryes then
//leg complete
begin
datamodule1.IBOtable1.fieldbyname('dumped').asstring := 'Y';
datamodule1.IBOtable1.fieldbyname('complete').asstring := 'Y';
datamodule1.IBOtable1.fieldbyname('DispName').asstring :=
LMDComboBox1.Text;
truck := datamodule1.IBOtable1.fieldbyname('trkid').asstring;
trailer := datamodule1.IBOtable1.fieldbyname('trlid').asstring;
driver := datamodule1.IBOtable1.fieldbyname('drvname').asstring;
driverid := datamodule1.IBOtable1.fieldbyname('drvid').asstring;
starttime := datamodule1.IBOtable1.fieldbyname('sttime').asstring;
startpoint := datamodule1.IBOtable1.fieldbyname('stpoints').asstring;
// fore info
fhaul := datamodule1.IBOtable1.fieldbyname('Fhaulid').asstring;
fdesc := datamodule1.IBOtable1.fieldbyname('Fdescription').asstring;
fcomm := datamodule1.IBOtable1.fieldbyname('Fcomments').asstring;
fsource := datamodule1.IBOtable1.FieldByName('Fsourceid').asstring;
fsname := datamodule1.IBOtable1.FieldByName('Fsourcename').asstring;
fdest := datamodule1.IBOtable1.FieldByName('Fdestid').asstring;
fdname := datamodule1.IBOtable1.FieldByName('Fdestname').asstring;
fseta := datamodule1.IBOtable1.FieldByName('Fseta').asstring;
fsday := datamodule1.IBOtable1.FieldByName('Fsday').asstring;
//haul info
haul := datamodule1.IBOtable1.fieldbyname('haulid').asstring;
desc := datamodule1.IBOtable1.fieldbyname('description').asstring;
comm := datamodule1.IBOtable1.fieldbyname('comments').asstring;
source := datamodule1.IBOtable1.FieldByName('sourceid').asstring;
sname := datamodule1.IBOtable1.FieldByName('sourcename').asstring;
dest := datamodule1.IBOtable1.FieldByName('destid').asstring;
dname := datamodule1.IBOtable1.FieldByName('destname').asstring;
scall := datamodule1.IBOtable1.FieldByName('scall').asstring;
sday := datamodule1.IBOtable1.FieldByName('asday').asstring;
dcall := datamodule1.IBOtable1.FieldByName('dcall').asstring;
dday := datamodule1.IBOtable1.FieldByName('adday').asstring;
heta := datamodule1.IBOtable1.FieldByName('heta').asstring;
hname := datamodule1.IBOtable1.FieldByName('hubname').asstring;
hub := datamodule1.IBOtable1.fieldbyname('tohub').asstring;
dispno := datamodule1.IBOtable1.fieldbyname('dispno').asinteger;
datamodule1.IBOtable1.post;
// prepare new leg
datamodule1.IBOtable1.insert;
datamodule1.IBOtable1.fieldbyname('trkid').asstring := truck;
datamodule1.IBOtable1.fieldbyname('trlid').asstring := trailer;
//drvid and start time
datamodule1.IBOtable1.fieldbyname('drvname').asstring := driver;
datamodule1.IBOtable1.fieldbyname('drvid').asstring := driverid;
datamodule1.IBOtable1.fieldbyname('sttime').asstring := starttime;
datamodule1.IBOtable1.fieldbyname('stpoints').asstring := startpoint;
//flags
datamodule1.IBOtable1.fieldbyname('dispatched').asstring := 'N';
datamodule1.IBOtable1.fieldbyname('loaded').asstring := 'N';
datamodule1.IBOtable1.fieldbyname('dumped').asstring := 'N';
datamodule1.IBOtable1.fieldbyname('complete').asstring := 'N';
// hubs info
datamodule1.IBOtable1.FieldByName('heta').asstring := heta;
datamodule1.IBOtable1.FieldByName('hubname').asstring := hname;
datamodule1.IBOtable1.fieldbyname('tohub').asstring := hub;
//forecasted haul
datamodule1.IBOtable1.fieldbyname('Fhaulid').asstring := fhaul;
datamodule1.IBOtable1.fieldbyname('Fdescription').asstring := fdesc;
datamodule1.IBOtable1.fieldbyname('Fcomments').asstring := fcomm;
datamodule1.IBOtable1.FieldByName('Fsourceid').asstring := fsource;
datamodule1.IBOtable1.FieldByName('Fsourcename').asstring := fsname;
datamodule1.IBOtable1.FieldByName('Fdestid').asstring := fdest;
datamodule1.IBOtable1.FieldByName('Fdestname').asstring := fdname;
datamodule1.IBOtable1.FieldByName('Fseta').asstring := fseta;
datamodule1.IBOtable1.FieldByName('Fsday').asstring := fsday;
// last leg
datamodule1.IBOtable1.fieldbyname('Lhaulid').asstring := haul;
datamodule1.IBOtable1.fieldbyname('Ldescription').asstring := desc;
datamodule1.IBOtable1.fieldbyname('Lcomments').asstring := comm;
datamodule1.IBOtable1.FieldByName('Lsourceid').asstring := source;
datamodule1.IBOtable1.FieldByName('Lsourcename').asstring := sname;
datamodule1.IBOtable1.FieldByName('Ldestid').asstring := dest;
datamodule1.IBOtable1.FieldByName('Ldestname').asstring := dname;
datamodule1.IBOtable1.FieldByName('Lsday').asstring := sday;
datamodule1.IBOtable1.FieldByName('Lscall').asstring := scall;
datamodule1.IBOtable1.FieldByName('Ldday').asstring := dday;
datamodule1.IBOtable1.FieldByName('Ldcall').asstring := dcall;
datamodule1.IBOTable1.FieldByName('Ldispno').asinteger := dispno;
datamodule1.IBOtable1.post;
end
else
begin
datamodule1.IBOtable1.fieldbyname('complete').asstring := 'N';
end;
end; //if ok
where/how would I make sure that this commits to the database table? there
is a CommitAction property on IBOTable1 set to caValidateCursor?
the users have reported some ISC errors but I was trying to capture them,
but don't know how to resume operation;
they get 4 errors consistently which they need to close the
application.would this affect the post of the above records?? I dont know
how to recover from these errors. I'm only now learning about error
trapping, could these be the cause of my grief? if yes how do I
trap/recover from these??
ISC_Error 335544344
error while trying to open file
to many files open
statement Tibo internal dataset
IBOquery2.iboqrlIBOquery2
this one for no apparent reason;
ISC_Error 335544345
Lock conflict on no wait transaction
deadlock
STATEMENT
TIB_statement ""
Statement
TIBOInternaldataset IBOTable1.IBOqrIBOTable1
this one at least once a day
ISC_Error 335544721
Unable to complete network request
to host "intrbase"
Error reading data from connection
unknown WIN 32 Error 10054
ERROR READING wwcombobox3.item index
WIN 32 ERROR Code 14
Not enough storage is available to complete this operation
[Non-text portions of this message have been removed]
here is basically the code in a close event;
if Form.ModalResult = mrOK then
begin
datamodule1.IBOtable1.edit;
datamodule1.IBOtable1.fieldbyname('dumpdate').asdatetime := now;
if form3.MessageDlgPosSetFont('Is This Load Dumped?',mtConfirmation,
[mbYes, mbNo], 0, 200,200,'MS Sans Serif',18,[fsbold]) = mryes then
//leg complete
begin
datamodule1.IBOtable1.fieldbyname('dumped').asstring := 'Y';
datamodule1.IBOtable1.fieldbyname('complete').asstring := 'Y';
datamodule1.IBOtable1.fieldbyname('DispName').asstring :=
LMDComboBox1.Text;
truck := datamodule1.IBOtable1.fieldbyname('trkid').asstring;
trailer := datamodule1.IBOtable1.fieldbyname('trlid').asstring;
driver := datamodule1.IBOtable1.fieldbyname('drvname').asstring;
driverid := datamodule1.IBOtable1.fieldbyname('drvid').asstring;
starttime := datamodule1.IBOtable1.fieldbyname('sttime').asstring;
startpoint := datamodule1.IBOtable1.fieldbyname('stpoints').asstring;
// fore info
fhaul := datamodule1.IBOtable1.fieldbyname('Fhaulid').asstring;
fdesc := datamodule1.IBOtable1.fieldbyname('Fdescription').asstring;
fcomm := datamodule1.IBOtable1.fieldbyname('Fcomments').asstring;
fsource := datamodule1.IBOtable1.FieldByName('Fsourceid').asstring;
fsname := datamodule1.IBOtable1.FieldByName('Fsourcename').asstring;
fdest := datamodule1.IBOtable1.FieldByName('Fdestid').asstring;
fdname := datamodule1.IBOtable1.FieldByName('Fdestname').asstring;
fseta := datamodule1.IBOtable1.FieldByName('Fseta').asstring;
fsday := datamodule1.IBOtable1.FieldByName('Fsday').asstring;
//haul info
haul := datamodule1.IBOtable1.fieldbyname('haulid').asstring;
desc := datamodule1.IBOtable1.fieldbyname('description').asstring;
comm := datamodule1.IBOtable1.fieldbyname('comments').asstring;
source := datamodule1.IBOtable1.FieldByName('sourceid').asstring;
sname := datamodule1.IBOtable1.FieldByName('sourcename').asstring;
dest := datamodule1.IBOtable1.FieldByName('destid').asstring;
dname := datamodule1.IBOtable1.FieldByName('destname').asstring;
scall := datamodule1.IBOtable1.FieldByName('scall').asstring;
sday := datamodule1.IBOtable1.FieldByName('asday').asstring;
dcall := datamodule1.IBOtable1.FieldByName('dcall').asstring;
dday := datamodule1.IBOtable1.FieldByName('adday').asstring;
heta := datamodule1.IBOtable1.FieldByName('heta').asstring;
hname := datamodule1.IBOtable1.FieldByName('hubname').asstring;
hub := datamodule1.IBOtable1.fieldbyname('tohub').asstring;
dispno := datamodule1.IBOtable1.fieldbyname('dispno').asinteger;
datamodule1.IBOtable1.post;
// prepare new leg
datamodule1.IBOtable1.insert;
datamodule1.IBOtable1.fieldbyname('trkid').asstring := truck;
datamodule1.IBOtable1.fieldbyname('trlid').asstring := trailer;
//drvid and start time
datamodule1.IBOtable1.fieldbyname('drvname').asstring := driver;
datamodule1.IBOtable1.fieldbyname('drvid').asstring := driverid;
datamodule1.IBOtable1.fieldbyname('sttime').asstring := starttime;
datamodule1.IBOtable1.fieldbyname('stpoints').asstring := startpoint;
//flags
datamodule1.IBOtable1.fieldbyname('dispatched').asstring := 'N';
datamodule1.IBOtable1.fieldbyname('loaded').asstring := 'N';
datamodule1.IBOtable1.fieldbyname('dumped').asstring := 'N';
datamodule1.IBOtable1.fieldbyname('complete').asstring := 'N';
// hubs info
datamodule1.IBOtable1.FieldByName('heta').asstring := heta;
datamodule1.IBOtable1.FieldByName('hubname').asstring := hname;
datamodule1.IBOtable1.fieldbyname('tohub').asstring := hub;
//forecasted haul
datamodule1.IBOtable1.fieldbyname('Fhaulid').asstring := fhaul;
datamodule1.IBOtable1.fieldbyname('Fdescription').asstring := fdesc;
datamodule1.IBOtable1.fieldbyname('Fcomments').asstring := fcomm;
datamodule1.IBOtable1.FieldByName('Fsourceid').asstring := fsource;
datamodule1.IBOtable1.FieldByName('Fsourcename').asstring := fsname;
datamodule1.IBOtable1.FieldByName('Fdestid').asstring := fdest;
datamodule1.IBOtable1.FieldByName('Fdestname').asstring := fdname;
datamodule1.IBOtable1.FieldByName('Fseta').asstring := fseta;
datamodule1.IBOtable1.FieldByName('Fsday').asstring := fsday;
// last leg
datamodule1.IBOtable1.fieldbyname('Lhaulid').asstring := haul;
datamodule1.IBOtable1.fieldbyname('Ldescription').asstring := desc;
datamodule1.IBOtable1.fieldbyname('Lcomments').asstring := comm;
datamodule1.IBOtable1.FieldByName('Lsourceid').asstring := source;
datamodule1.IBOtable1.FieldByName('Lsourcename').asstring := sname;
datamodule1.IBOtable1.FieldByName('Ldestid').asstring := dest;
datamodule1.IBOtable1.FieldByName('Ldestname').asstring := dname;
datamodule1.IBOtable1.FieldByName('Lsday').asstring := sday;
datamodule1.IBOtable1.FieldByName('Lscall').asstring := scall;
datamodule1.IBOtable1.FieldByName('Ldday').asstring := dday;
datamodule1.IBOtable1.FieldByName('Ldcall').asstring := dcall;
datamodule1.IBOTable1.FieldByName('Ldispno').asinteger := dispno;
datamodule1.IBOtable1.post;
end
else
begin
datamodule1.IBOtable1.fieldbyname('complete').asstring := 'N';
end;
end; //if ok
where/how would I make sure that this commits to the database table? there
is a CommitAction property on IBOTable1 set to caValidateCursor?
the users have reported some ISC errors but I was trying to capture them,
but don't know how to resume operation;
they get 4 errors consistently which they need to close the
application.would this affect the post of the above records?? I dont know
how to recover from these errors. I'm only now learning about error
trapping, could these be the cause of my grief? if yes how do I
trap/recover from these??
ISC_Error 335544344
error while trying to open file
to many files open
statement Tibo internal dataset
IBOquery2.iboqrlIBOquery2
this one for no apparent reason;
ISC_Error 335544345
Lock conflict on no wait transaction
deadlock
STATEMENT
TIB_statement ""
Statement
TIBOInternaldataset IBOTable1.IBOqrIBOTable1
this one at least once a day
ISC_Error 335544721
Unable to complete network request
to host "intrbase"
Error reading data from connection
unknown WIN 32 Error 10054
ERROR READING wwcombobox3.item index
WIN 32 ERROR Code 14
Not enough storage is available to complete this operation
[Non-text portions of this message have been removed]