Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread "Pulling" the Trigger
Fri, Apr 28 2006 9:04 AMPermanent Link

"Michael Eubanks"

We are having some trouble with a trigger that I compiled in the
database engine V4.22b4. The following messages are excerpts appearing
in our log:

4/23/2006 1:46:53 PM [ERROR] Engine error [DBISAM Engine Error # 11314
An error occurred during a trigger on the table 'Terminal Sync File' -
List index out of bounds (43)] [Client Version: 4.22 User Name: REDEM01
Address: 192.168.17.103 Encrypted: Yes Request: REQUEST_MODIFYRECORD
Thread: 4520 Session: 18511880]

4/25/2006 12:42:22 PM [ERROR] Engine error [DBISAM Engine Error # 11314
An error occurred during a trigger on the table 'Master' - List index
out of bounds (44)] [Client Version: 4.22 User Name: KIT01 Address:
192.168.17.78 Encrypted: Yes Request: REQUEST_MODIFYRECORD Thread: 1368
Session: 71055368]

4/27/2006 3:22:03 PM [ERROR] Engine error [DBISAM Engine Error # 11314
An error occurred during a trigger on the table 'Password File' -
Access violation at address 00427464 in module 'dbsrvr.exe'. Read of
address 00000010] [Client Version: 4.22 User Name: BS01 Address:
192.168.17.25 Encrypted: Yes Request: REQUEST_MODIFYRECORD Thread: 4376
Session: 19134472]
4/27/2006 3:22:05 PM [ERROR] Engine error [DBISAM Engine Error # 11314
An error occurred during a trigger on the table 'Transaction File' -
Access violation at address 00408D64 in module 'dbsrvr.exe'. Read of
address 94004039] [Client Version: 4.22 User Name: MC04 Address:
192.168.17.105 Encrypted: Yes Request: REQUEST_APPENDRECORD Thread: 912
Session: 71194632]
4/27/2006 3:22:07 PM [ERROR] Engine error [DBISAM Engine Error # 11314
An error occurred during a trigger on the table 'Password File' -
Access violation at address 00408D64 in module 'dbsrvr.exe'. Read of
address 94004039] [Client Version: 4.22 User Name: BS01 Address:
192.168.17.25 Encrypted: Yes Request: REQUEST_MODIFYRECORD Thread: 4376
Session: 19134472]
4/27/2006 3:22:11 PM Logout [Client Version: 4.22 User Name: BS01
Address: 192.168.17.25 Encrypted: Yes Thread: 4376 Session: 19134472]
4/27/2006 3:22:11 PM Connection closed [Client Version: 4.22 User Name:
Address: 192.168.17.25 Encrypted: Yes Thread: 4376 Session: 0]
4/27/2006 3:22:20 PM [ERROR] Engine error [DBISAM Engine Error # 11314
An error occurred during a trigger on the table 'Employee' - Access
violation at address 00408D64 in module 'dbsrvr.exe'. Read of address
94004039] [Client Version: 4.22 User Name: AJPF07-XP Address:
192.168.17.39 Encrypted: Yes Request: REQUEST_MODIFYRECORD Thread: 4568
Session: 19193864]
4/27/2006 3:22:22 PM [ERROR] Engine error [DBISAM Engine Error # 11314
An error occurred during a trigger on the table 'Master' - Access
violation at address 00408D64 in module 'dbsrvr.exe'. Read of address
94004039] [Client Version: 4.22 User Name: BS01 Address: 192.168.17.25
Encrypted: Yes Request: REQUEST_MODIFYRECORD Thread: 1012 Session:
91963400]

The error message may appear on multiple tables from any workstation.
Both on insert and update events in the database engine point to the
same triger event.

The trigger code is as follows:

procedure TMainForm.ServerEngineBeforeInsertTrigger(Sender: TObject;
 TriggerSession: TDBISAMSession; TriggerDatabase: TDBISAMDatabase;
 const TableName: string; CurrentRecord: TDBISAMRecord);
Var
  Qry: tDBISAMQuery;
  StoreID: String;
begin
     Qry := tDBISAMQuery.Create(Self);
     Try
       Try
         Qry.SessionName := TriggerSession.SessionName;
         Qry.DatabaseName := TriggerDatabase.DatabaseName;
         Qry.SQL.Text := 'Select Parameter from "Parameter File" where
"Parameter Number" = 1';
         Qry.Open;
         StoreID := Qry.FieldByName('Parameter').AsString;
         Qry.Close;
       Except
         StoreID := '001';   
       End;
     Finally
       Qry.Free;
     End;



     If CurrentRecord.FindField('Store ID') <> Nil then
        CurrentRecord.FieldByName('Store ID').AsString := StoreID;

     If CurrentRecord.FindField('Update Central Flag') <> Nil then
        CurrentRecord.FieldByName('Update Central Flag').AsInteger :=
-1;

     If CurrentRecord.FindField('Update Central Date') <> Nil then
        CurrentRecord.FieldByName('Update Central Date').AsDateTime :=
Date;

     If CurrentRecord.FindField('Update Central Time') <> Nil then
        CurrentRecord.FieldByName('Update Central Time').AsDateTime :=
Time;


     If TableName = 'Inventory Audit Qty' then
             CurrentRecord.FieldByname('CurrentQty').AsInteger :=
             + CurrentRecord.FieldByname('Begin').AsInteger
             - CurrentRecord.FieldByname('Sold').AsInteger
             - CurrentRecord.FieldByname('Shiped').AsInteger
             + CurrentRecord.FieldByname('Received').AsInteger
             - CurrentRecord.FieldByname('Transfered').AsInteger
             + CurrentRecord.FieldByname('Transfered In').AsInteger
             - CurrentRecord.FieldByname('Refunds').AsInteger;

     If TableName = 'Transaction File' then begin
        CurrentRecord.FieldByName('Time').AsDateTime := Time;
     End;

end;

J. Michael Eubanks
Ideal Software Systems, Inc.
Fri, Apr 28 2006 3:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< We are having some trouble with a trigger that I compiled in thedatabase
engine V4.22b4. The following messages are excerpts appearing in our log: >>

Have you reproduced the issue in a test environment at all ?  Also, does
this happen all of the time, or only at certain times ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, May 1 2006 10:45 AMPermanent Link

"Michael Eubanks"
Tim Young [Elevate Software] wrote:

> Have you reproduced the issue in a test environment at all ?  Also,
> does this happen all of the time, or only at certain times ?

We haven't been able to reproduce this issue at all in a test
enviroment, we believe that this only occures when the server is under
a heavy load of 1000s of inserts and updates per hour. For the weekend
we did make a change to the script that seems to have fixed it. We
changed

Qry := tDBISAMQuery.Create(Self);
to
Qry := tDBISAMQuery.Create(Nil);

and we also added a try except bock around the entire trigger. We are
not sure if the exception is capturing the error or changing the create
statment fixed the problem. We will be making some additional changes
to help isolated the problem if there is still one. I was hoping there
was somthing obvious in the trigger code that pointed to that problem.
The trigger is pretty streight forward I had thought it was simple
mistake.

Thanks,

J. Michael Eubanks
Ideal Software Systems, Inc.
Mon, May 1 2006 2:33 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< We haven't been able to reproduce this issue at all in a test enviroment,
we believe that this only occures when the server is under a heavy load of
1000s of inserts and updates per hour. For the weekend we did make a change
to the script that seems to have fixed it. We
changed

Qry := tDBISAMQuery.Create(Self);
to
Qry := tDBISAMQuery.Create(Nil);

and we also added a try except bock around the entire trigger. We are not
sure if the exception is capturing the error or changing the create
statment fixed the problem. We will be making some additional changes to
help isolated the problem if there is still one. I was hoping there
was somthing obvious in the trigger code that pointed to that problem. The
trigger is pretty streight forward I had thought it was simple
mistake. >>

Nothing is obvious as far as I can see.  And the load should have no bearing
on whether the trigger behaves itself or not - the only problems you might
get with load are locking conflicts or general slowness.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image