Subject | Re: [IBO] IBO Events are missed |
---|---|
Author | Ken Thompson |
Post date | 2004-04-01T15:40:13Z |
Helen:
thanks for willingness to help solve our problem as we 'are dead in the
water'.
ken thompson
Helen asked:
Interbase with Stored Procedure, BDE with Server Field pointing to local
DB name on local
ME computer.
Using Network Client/Server for operation: Same Application. Changed
BDE server name to Network Server.
Using tcp/ip network, Changed to visible IP address.
the
server. See folowing ---->
BDE version 5.11, InterBase version 5.6 Test machine.
IB version 6.4 on Server. TDatabase
IB objects: TIB_connection, TIB_Events and TIBOTransaction.
We have not attempted to run Tester on network Server yet. However our
other applications
are running on network C/S only with timing issues with Stored
Procedures.
That is why we 'stepped back' and wrote our tester for the LOCAL ME
computer.
This is Application makeup for our Tester.
Developing and testing on ONE computer with ONE project with unit of
Application code, unit of common
global functions and unit with Main Data Module Built into ONE EXE file.
We can run our tester on local machine up to about 200
inserts/update/reads with 0.0 % missed alerts.
More than that number approx. 50 % to 70 % get missed. Clue ... seems
like collection not flushed or
Event of 'EventsPending' set to false before Alert processing is
finished.
We really want to change the 'until to yyDoneSwt' then we will know DB
actions
have been completed. However running tester with that 'until' locks up
after about 200 calls
to Stored Procedure.
Salient data ..............
procedure DoSpNew;
begin
with Form1 do
begin
yyDoneSwt := false; GlobalEventSwt[ 7 ] := false;
// IB_EventsSysTest.RegisterEvents is done at startup.
with spManageTestSys do
begin
ParamByName('I_CC').AsString := zzCompanyCode;
ParamByName('I_SC').AsString := zzSiteCode;
ParamByName('I_USER_ID').AsString := yyUserId;
......
ParamByName('I_ACTION').AsString := yyAction;
Prepare; ExecProc; // fire procedure
end;
IBOTransactionSysTest.Commit; <--- have tried both Committed and
CommitsRetaining
repeat
if GlobalEventSwt[ 7 ] then break;
IB_EventsSysTest.CheckEvents;
until not IB_EventsSysTest.ProcessingEvents and not
IB_EventsSysTest.EventsPending;
if not yyDoneSwt then inc(NotDoneCnt);
if GlobalEventSwt[ 7 ] then exit;
end;
end;
begin/end blanked ...
procedure TForm1.IB_EventsSysTestEventAlert(Sender : TObject;
AEventName : string; AEventCount : Integer);
yyDoneSwt := true; inc(AlertCnt); <--- we have checked the AEVentName
and is correct
on NON missed Events.
procedure TForm1.IB_EventsSysTestError(Sender : TObject;
const ERRCODE : Integer; ErrorMessage, ErrorCodes : TStringList;
const SQLCODE : Integer; SQLMessage, SQL : TStringList;
var RaiseException : Boolean);
showmessage('Event Error SysTest'); GlobalEventSwt[ 7 ] := true; <--
never got this ERROR
procedure TForm1.qrySysTestBeforePost(DataSet : TDataSet);
qrySysTestACTIVITY_DATE.value := NOW; <-- we set activity date same
method on all datasets.
object MainDataModule: TMainDataModule
OldCreateOrder = False
object IB_ConnectionFCM: TIB_Connection
AliasName = 'FCMMainServer'
Params.Strings = (
'PATH=C:\FcMason\Data\ServerFCM.gdb' <--- on network client/server
this gets changed
to Server Path.
'SERVER=Server')
object dbFCM: TDatabase
AliasName = 'FCMMainServer' <--- alias does not change on Network
Client/Server just BDE server field
gets changed.
LoginPrompt = False
SessionName = 'Default'
OnLogin = dbFCMLogin
object Form1: TForm1 major objects with major parameters ....
object IBOTransactionSysTest: TIBOTransaction
IB_Connection = MainDataModule.IB_ConnectionFCM
Isolation = tiCommitted
object IB_EventsSysTest: TIB_Events
AlertOnRegister = False
IB_Connection = MainDataModule.IB_ConnectionFCM
Events.Strings = ('DONE')
Passive = False
OnEventAlert = IB_EventsSysTestEventAlert
AfterRegister = IB_EventsSysTestAfterRegister
OnError = IB_EventsSysTestError
object qrySysTest: TwwQuery
BeforePost = qrySysTestBeforePost
DatabaseName = 'FCMMainServer'
SQL.Strings = ('select * from sys_test')
UpdateObject = upSysTest
ValidateWithMask = True
object spManageTestSys: TwwStoredProc
DatabaseName = 'FCMMainServer'
StoredProcName = 'SP_MANAGE_TEST_SYS'
ValidateWithMask = True
object dsSysTest: TwwDataSource
DataSet = qrySysTest
object upSysTest: TUpdateSQL
object qryFetch: TwwQuery
DatabaseName = 'FCMMainServer'
SQL.Strings = ('select * from sys_test')
ValidateWithMask = True
.... last line of this message ................
thanks for willingness to help solve our problem as we 'are dead in the
water'.
ken thompson
Helen asked:
> > You have all of these things in one application? A BDE TDatabase andgds32.dll version 5.6.0.29, ibserver.exe version 5.6.0.29
> > some IBO connection component? see following
Interbase with Stored Procedure, BDE with Server Field pointing to local
DB name on local
ME computer.
Using Network Client/Server for operation: Same Application. Changed
BDE server name to Network Server.
Using tcp/ip network, Changed to visible IP address.
>>In addition to answering all of the above questions, would you pleaseprovide the connection string that your application uses to attach to
the
server. See folowing ---->
BDE version 5.11, InterBase version 5.6 Test machine.
IB version 6.4 on Server. TDatabase
IB objects: TIB_connection, TIB_Events and TIBOTransaction.
We have not attempted to run Tester on network Server yet. However our
other applications
are running on network C/S only with timing issues with Stored
Procedures.
That is why we 'stepped back' and wrote our tester for the LOCAL ME
computer.
This is Application makeup for our Tester.
Developing and testing on ONE computer with ONE project with unit of
Application code, unit of common
global functions and unit with Main Data Module Built into ONE EXE file.
We can run our tester on local machine up to about 200
inserts/update/reads with 0.0 % missed alerts.
More than that number approx. 50 % to 70 % get missed. Clue ... seems
like collection not flushed or
Event of 'EventsPending' set to false before Alert processing is
finished.
We really want to change the 'until to yyDoneSwt' then we will know DB
actions
have been completed. However running tester with that 'until' locks up
after about 200 calls
to Stored Procedure.
Salient data ..............
procedure DoSpNew;
begin
with Form1 do
begin
yyDoneSwt := false; GlobalEventSwt[ 7 ] := false;
// IB_EventsSysTest.RegisterEvents is done at startup.
with spManageTestSys do
begin
ParamByName('I_CC').AsString := zzCompanyCode;
ParamByName('I_SC').AsString := zzSiteCode;
ParamByName('I_USER_ID').AsString := yyUserId;
......
ParamByName('I_ACTION').AsString := yyAction;
Prepare; ExecProc; // fire procedure
end;
IBOTransactionSysTest.Commit; <--- have tried both Committed and
CommitsRetaining
repeat
if GlobalEventSwt[ 7 ] then break;
IB_EventsSysTest.CheckEvents;
until not IB_EventsSysTest.ProcessingEvents and not
IB_EventsSysTest.EventsPending;
if not yyDoneSwt then inc(NotDoneCnt);
if GlobalEventSwt[ 7 ] then exit;
end;
end;
begin/end blanked ...
procedure TForm1.IB_EventsSysTestEventAlert(Sender : TObject;
AEventName : string; AEventCount : Integer);
yyDoneSwt := true; inc(AlertCnt); <--- we have checked the AEVentName
and is correct
on NON missed Events.
procedure TForm1.IB_EventsSysTestError(Sender : TObject;
const ERRCODE : Integer; ErrorMessage, ErrorCodes : TStringList;
const SQLCODE : Integer; SQLMessage, SQL : TStringList;
var RaiseException : Boolean);
showmessage('Event Error SysTest'); GlobalEventSwt[ 7 ] := true; <--
never got this ERROR
procedure TForm1.qrySysTestBeforePost(DataSet : TDataSet);
qrySysTestACTIVITY_DATE.value := NOW; <-- we set activity date same
method on all datasets.
object MainDataModule: TMainDataModule
OldCreateOrder = False
object IB_ConnectionFCM: TIB_Connection
AliasName = 'FCMMainServer'
Params.Strings = (
'PATH=C:\FcMason\Data\ServerFCM.gdb' <--- on network client/server
this gets changed
to Server Path.
'SERVER=Server')
object dbFCM: TDatabase
AliasName = 'FCMMainServer' <--- alias does not change on Network
Client/Server just BDE server field
gets changed.
LoginPrompt = False
SessionName = 'Default'
OnLogin = dbFCMLogin
object Form1: TForm1 major objects with major parameters ....
object IBOTransactionSysTest: TIBOTransaction
IB_Connection = MainDataModule.IB_ConnectionFCM
Isolation = tiCommitted
object IB_EventsSysTest: TIB_Events
AlertOnRegister = False
IB_Connection = MainDataModule.IB_ConnectionFCM
Events.Strings = ('DONE')
Passive = False
OnEventAlert = IB_EventsSysTestEventAlert
AfterRegister = IB_EventsSysTestAfterRegister
OnError = IB_EventsSysTestError
object qrySysTest: TwwQuery
BeforePost = qrySysTestBeforePost
DatabaseName = 'FCMMainServer'
SQL.Strings = ('select * from sys_test')
UpdateObject = upSysTest
ValidateWithMask = True
object spManageTestSys: TwwStoredProc
DatabaseName = 'FCMMainServer'
StoredProcName = 'SP_MANAGE_TEST_SYS'
ValidateWithMask = True
object dsSysTest: TwwDataSource
DataSet = qrySysTest
object upSysTest: TUpdateSQL
object qryFetch: TwwQuery
DatabaseName = 'FCMMainServer'
SQL.Strings = ('select * from sys_test')
ValidateWithMask = True
.... last line of this message ................