Subject | Re: [IBO] Help : Connection lost - without no event |
---|---|
Author | ronald_greven |
Post date | 2004-03-12T09:14:27Z |
Hi Jason,
many thanks for answering. It's really hard to explain, cause I don't
know what really happens. It seem, as it would be a timeout, or the
actual cursor is lost, or something like this.
I try to explain as good, as I can, what happens :
The programm, I wrote, is a cashing system.
I always display the actual bill-no. in a IB_Text. Also, I display
the acutal invoice total in a IB_Edit. If nothings happens, the
invoice total is '0.00' and is always shown. The bill-no. is for
example '21'. So, suddenly, the IB_Edit is empty (''), no more value
is shown neither in the IB_Edit, nor in the IB_Text.
I write a Log-File, where no event is triggered like after
disconnect, or OnConnectedChanged.
My biggest problem is, that I cant reconstruct this problem on my
system. But it happens on 2 different machines of our customers,
sometime more the 10 or 15 times a day.
What I know is, that if the press a special key (following source is
behind this key :
procedure TForm1.DeleteLastBon;
begin
// select * from DeleteLastBon(:Primary1)
//ShowMessage(DataModule1.IB_Bon.FieldByName('PRIMARY1').AsString);
try
if DataModule1.IB_Transaction1.InTransaction then
DataModule1.IB_Transaction1.Commit;
DataModule1.IB_Transaction1.StartTransaction;
with DataModule1.IB_DeleteLastBon do
begin
if DataModule1.IB_Bon.FieldByName('PRIMARY1').AsString <> ''
then
begin
ParamByName('PRIMARY1').AsString :=
DataModule1.IB_Bon.FieldByName('PRIMARY1').AsString;
Open;
Close;
end;
end;
DataModule1.IB_Transaction1.Commit;
except
ShowMessage('Can not delete'+#13#10+
'Primäry : '+DataModule1.IB_Bon.FieldByName
('PRIMARY1').AsString);
end;
end;)
After this, I create a new bon, without reconnecting, and all works,
like nothing would ever happend before.
Our customers are slowly getting angry, and dont have the slightest
idea what this could be. It also could be, that it is a problem of
the operating system. Just for information:
The timeout-props in the IB_Transaction object are the following:
TimeoutProps.AllowCheckOAT = 120
TimeoutProps.Attempt = 1200
TimeoutProps.AttemptMaxRows = 5000
TimeoutProps.AttemptTicks = 150
TimeoutProps.AttemptRetry = 5
TimeoutProps.PromptUser = 0
TimeoutProps.PromptUserDuration = 15
TimeoutProps.PromptUserRetry = 60
TimeoutProps.ForceClosed = 0
maybe there could be a problem anywhere, I really dont know.
Hope you can help, or you have an idea, what I could do.
Best greetings
Ronni
many thanks for answering. It's really hard to explain, cause I don't
know what really happens. It seem, as it would be a timeout, or the
actual cursor is lost, or something like this.
I try to explain as good, as I can, what happens :
The programm, I wrote, is a cashing system.
I always display the actual bill-no. in a IB_Text. Also, I display
the acutal invoice total in a IB_Edit. If nothings happens, the
invoice total is '0.00' and is always shown. The bill-no. is for
example '21'. So, suddenly, the IB_Edit is empty (''), no more value
is shown neither in the IB_Edit, nor in the IB_Text.
I write a Log-File, where no event is triggered like after
disconnect, or OnConnectedChanged.
My biggest problem is, that I cant reconstruct this problem on my
system. But it happens on 2 different machines of our customers,
sometime more the 10 or 15 times a day.
What I know is, that if the press a special key (following source is
behind this key :
procedure TForm1.DeleteLastBon;
begin
// select * from DeleteLastBon(:Primary1)
//ShowMessage(DataModule1.IB_Bon.FieldByName('PRIMARY1').AsString);
try
if DataModule1.IB_Transaction1.InTransaction then
DataModule1.IB_Transaction1.Commit;
DataModule1.IB_Transaction1.StartTransaction;
with DataModule1.IB_DeleteLastBon do
begin
if DataModule1.IB_Bon.FieldByName('PRIMARY1').AsString <> ''
then
begin
ParamByName('PRIMARY1').AsString :=
DataModule1.IB_Bon.FieldByName('PRIMARY1').AsString;
Open;
Close;
end;
end;
DataModule1.IB_Transaction1.Commit;
except
ShowMessage('Can not delete'+#13#10+
'Primäry : '+DataModule1.IB_Bon.FieldByName
('PRIMARY1').AsString);
end;
end;)
After this, I create a new bon, without reconnecting, and all works,
like nothing would ever happend before.
Our customers are slowly getting angry, and dont have the slightest
idea what this could be. It also could be, that it is a problem of
the operating system. Just for information:
The timeout-props in the IB_Transaction object are the following:
TimeoutProps.AllowCheckOAT = 120
TimeoutProps.Attempt = 1200
TimeoutProps.AttemptMaxRows = 5000
TimeoutProps.AttemptTicks = 150
TimeoutProps.AttemptRetry = 5
TimeoutProps.PromptUser = 0
TimeoutProps.PromptUserDuration = 15
TimeoutProps.PromptUserRetry = 60
TimeoutProps.ForceClosed = 0
maybe there could be a problem anywhere, I really dont know.
Hope you can help, or you have an idea, what I could do.
Best greetings
Ronni
--- In IBObjects@yahoogroups.com, jwharton@i... wrote:
> I'm not getting to an essence of the problem.
> Please provide more information.
>
> Jason
>
> --------------------------------------------------------------------
------------
> --------------------------------------------------------------------
------------
> Hi,
>
> I have a big problem.
> I use a TIB_Edit in my Application, where always a special value is
> shown. Sometimes, without no action, this IB_Edit is Empty, no
value
> is being shown, but the event AfterDisconnect or OnConnected
changed
> is not triggered.
>
> In the IB_Connection Object I changed the following Properties :
>
> object IB_Connection1: TIB_Connection
> DefaultTransaction = IB_Transaction1
> Params.Strings = (
> 'PROTOCOL=TCP/IP'
> 'PAGE SIZE=8192')
> BeforeConnect = IB_Connection1BeforeConnect
> AfterConnect = IB_Connection1AfterConnect
> BeforeDisconnect = IB_Connection1BeforeDisconnect
> AfterDisconnect = IB_Connection1AfterDisconnect
> OnConnectedChanged = IB_Connection1ConnectedChanged
> OnError = IB_Connection1Error
> Left = 24
> Top = 8
> end
>
> in the source-code I connect the database as following :
>
> DataModule1.IB_Connection1.Password := 'masterkey';
> DataModule1.IB_Connection1.Username := 'sysdba';
> DataModule1.IB_Connection1.CharSet := 'WIN1252';
> DataModule1.IB_Connection1.PageSize := 8192;
> DataModule1.IB_Connection1.Database := Mandant.Pfad;
> DataModule1.IB_Connection1.Connect;
>
> my transaction-object has the following changed properties:
> object IB_Transaction1: TIB_Transaction
> IB_Connection = IB_Connection1
> Isolation = tiCommitted
> OnError = IB_Transaction1Error
> Left = 120
> Top = 8
> end
>
> the query I am using has the following properies :
> object IB_Bon: TIB_Query
> DatabaseName = ':'
> FieldsAlignment.Strings = (
> 'BELEGNR=L')
> FieldsDisplayFormat.Strings = (
> 'BRUTTO=#,###,##0.00')
> IB_Connection = IB_Connection1
> SQL.Strings = (
> 'select * from Bon'
> 'where Primary1=:Primary1'
> '')
> OnError = IB_AbschlussinfoError
> AutoFetchAll = True
> CallbackInc = -1
> CallbackInitInt = 0
> CallbackRefreshInt = 0
> ColorScheme = False
> KeyLinks.Strings = (
> 'BON.PRIMARY1')
> MasterSearchFlags = [msfOpenMasterOnOpen,
> msfSearchAppliesToMasterOnly]
> RequestLive = True
> BufferSynchroFlags = [bsBeforeEdit, bsAfterEdit, bsAfterInsert]
> CommitAction = caRefresh
> FetchWholeRows = True
> Left = 24
> Top = 352
> end
>
> I only show you them, cause I have absolutly no idea, where this
> problem can come from. I dont know, if its a problem with the
> IB_Conncetion-Object, if it is a problem with the IB_Transaction-
> object or maybe something with the IB_Query.
>
> I hope you can help..
>
>
> Best greetings
>
> Ronni