Subject | Re: Lost connection to firebird after execute procedure |
---|---|
Author | wojciech_materna |
Post date | 2004-12-06T08:54:42Z |
--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>
wrote:
Next open the same next time with same selects - and I heave errors.
The same things happens, when I open (create) that window 2 times
without closing first.
PREPARE STATEMENT
TR_HANDLE = 34942824
STMT_HANDLE = 34832592
select n.konto,o.nazwa nazwa,sum(n.kwota_wn) naleznosc,max
(n.opoznienie) opoznienie,min(n.opoznienie) opozmin,avg
(n.opoznienie) opozsr,count(*) ile,sum(n.jesto) ileo,sum(n.jestz)
ileoz, sum(n.kwota_wno) nalopoz,sum(n.kwota_wnz) nalopozz from
OBR_NRK('101,201 0000000044 ,201 00667 ,201
0987654321 ,201 100 ,201 5260210429 ,201 6840019862,201
5272098665,201 8133196354',0,0) n , odbdosraz o where
o.konto=n.konto and n.konto starting with '201' and n.znak=1 group
by n.konto,o.nazwa
ORDER BY 2 ASC
FIELDS = [ Version 1 SQLd 11 SQLn 44
KONTO = <NIL>
[NAZWA] = <NIL>
[NALEZNOSC] = <NIL>
[OPOZNIENIE] = <NIL>
[OPOZMIN] = <NIL>
[OPOZSR] = <NIL>
[ILE] = <NIL>
[ILEO] = <NIL>
[ILEOZ] = <NIL>
[NALOPOZ] = <NIL>
[NALOPOZZ] = <NIL> ]
SECONDS = 0.020
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 34942824
STMT_HANDLE = 34832592
PARAMS = [ ]
SELECT COUNT: 4216
SECONDS = 3.345
OBR_NRK and ODBDOSRAZ are stored procedures reading data from
tables, nothing changes, inserts - just select.
Second try to open same query gives me :
PREPARE STATEMENT
TR_HANDLE = 34832852
STMT_HANDLE = 34942616
select n.konto,o.nazwa nazwa,sum(n.kwota_wn) naleznosc,max
(n.opoznienie) opoznienie,min(n.opoznienie) opozmin,avg
(n.opoznienie) opozsr,count(*) ile,sum(n.jesto) ileo,sum(n.jestz)
ileoz, sum(n.kwota_wno) nalopoz,sum(n.kwota_wnz) nalopozz from
OBR_NRK('101,201 0000000044 ,201 00667 ,201
0987654321 ,201 100 ,201 5260210429 ,201 6840019862,201
5272098665,201 8133196354',0,0) n , odbdosraz o where
o.konto=n.konto and n.konto starting with '201' and n.znak=1 group
by n.konto,o.nazwa
ORDER BY 2 ASC
FIELDS = [ Version 1 SQLd 11 SQLn 44
KONTO = <NIL>
[NAZWA] = <NIL>
[NALEZNOSC] = <NIL>
[OPOZNIENIE] = <NIL>
[OPOZMIN] = <NIL>
[OPOZSR] = <NIL>
[ILE] = <NIL>
[ILEO] = <NIL>
[ILEOZ] = <NIL>
[NALOPOZ] = <NIL>
[NALOPOZZ] = <NIL> ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 34832852
STMT_HANDLE = 34942616
PARAMS = [ ]
SECONDS = 0.561
ERRCODE = 335544721
----*/
/*---
INTERPRETE BUFFER =
ERRCODE = 53
----*/
/*---
INTERPRETE BUFFER = Unable to complete network request to host "top-
sql".
ERRCODE = 39
----*/
/*---
INTERPRETE BUFFER = Error reading data from the connection.
ERRCODE = -1
once again.
group. Maybe You can tell me something helpfull after my post?
Wojtek
wrote:
> At 11:53 PM 4/12/2004 +0000, you wrote:row
>
> > > When you say "execute stored procedure", what do you mean?
> > > a) is it an executable stored procedure that returns a single
> >ofa
> > > results following an EXECUTE PROCEDURE call?
> > > or
> > > b) is it a selectable stored procedure that includes a FOR
> > > SELECT...INTO...DO...SUSPEND loop that returns a multi-row set
> >upon a
> > > SELECT <output list> FROM ... call?
> > >
> > > Or is it a SP that actually changes some data and also returns
> >multi-rowwithout
> > > set?
> > >
> >
> >It is procedure FOR SELECT ........ SUSPEND, only shows data
> >any update or insert. But takes data from second procedure andsome
> >tables.procedure
>
> This is not clear. Didn't you say that, if one instance of the
> was running in one window, another instance of the same procedurewould
> refuse to run in the second window, and return the bad block error?It is one window - creating once, showing, then closed, released.
>
Next open the same next time with same selects - and I heave errors.
The same things happens, when I open (create) that window 2 times
without closing first.
> > > -- The first is that on Firebird 1.0 you have some conditionwhere
> >aand
> > > running SP blocks another transaction from running the same SP
> > > apparently returns an error related to a bad block (parameter?I
> > > transaction?). Does it occur at Prepare time or at run-time?
> >would wantis
> > > to enable an ib_monitordialog in the application, to see what
> >beingtell
> > > passed to and from the server when this error occurs.
> > >
> >
> >At run-time. I don't know about this conditions,sorry. Can You
> >me few words about it?to
>
> Presumably, before you run the stored procedure, your code checks
> determine whether the statement is prepared:is
>
> with MySPDataset do begin
> if not Prepared then Prepare;
>
> >I will try to observe in monitordialog what
> >exactly is being passed to and from server.
>
> The monitor will show you the contents of the parameter block that
> passed to the server at Prepare time; and it will subsequentlyshow you
> the values that are passed in the parameters when the statement isexecuted.
>When everything goes well (first time) monitor shows:
PREPARE STATEMENT
TR_HANDLE = 34942824
STMT_HANDLE = 34832592
select n.konto,o.nazwa nazwa,sum(n.kwota_wn) naleznosc,max
(n.opoznienie) opoznienie,min(n.opoznienie) opozmin,avg
(n.opoznienie) opozsr,count(*) ile,sum(n.jesto) ileo,sum(n.jestz)
ileoz, sum(n.kwota_wno) nalopoz,sum(n.kwota_wnz) nalopozz from
OBR_NRK('101,201 0000000044 ,201 00667 ,201
0987654321 ,201 100 ,201 5260210429 ,201 6840019862,201
5272098665,201 8133196354',0,0) n , odbdosraz o where
o.konto=n.konto and n.konto starting with '201' and n.znak=1 group
by n.konto,o.nazwa
ORDER BY 2 ASC
FIELDS = [ Version 1 SQLd 11 SQLn 44
KONTO = <NIL>
[NAZWA] = <NIL>
[NALEZNOSC] = <NIL>
[OPOZNIENIE] = <NIL>
[OPOZMIN] = <NIL>
[OPOZSR] = <NIL>
[ILE] = <NIL>
[ILEO] = <NIL>
[ILEOZ] = <NIL>
[NALOPOZ] = <NIL>
[NALOPOZZ] = <NIL> ]
SECONDS = 0.020
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 34942824
STMT_HANDLE = 34832592
PARAMS = [ ]
SELECT COUNT: 4216
SECONDS = 3.345
OBR_NRK and ODBDOSRAZ are stored procedures reading data from
tables, nothing changes, inserts - just select.
Second try to open same query gives me :
PREPARE STATEMENT
TR_HANDLE = 34832852
STMT_HANDLE = 34942616
select n.konto,o.nazwa nazwa,sum(n.kwota_wn) naleznosc,max
(n.opoznienie) opoznienie,min(n.opoznienie) opozmin,avg
(n.opoznienie) opozsr,count(*) ile,sum(n.jesto) ileo,sum(n.jestz)
ileoz, sum(n.kwota_wno) nalopoz,sum(n.kwota_wnz) nalopozz from
OBR_NRK('101,201 0000000044 ,201 00667 ,201
0987654321 ,201 100 ,201 5260210429 ,201 6840019862,201
5272098665,201 8133196354',0,0) n , odbdosraz o where
o.konto=n.konto and n.konto starting with '201' and n.znak=1 group
by n.konto,o.nazwa
ORDER BY 2 ASC
FIELDS = [ Version 1 SQLd 11 SQLn 44
KONTO = <NIL>
[NAZWA] = <NIL>
[NALEZNOSC] = <NIL>
[OPOZNIENIE] = <NIL>
[OPOZMIN] = <NIL>
[OPOZSR] = <NIL>
[ILE] = <NIL>
[ILEO] = <NIL>
[ILEOZ] = <NIL>
[NALOPOZ] = <NIL>
[NALOPOZZ] = <NIL> ]
----*/
/*---
EXECUTE STATEMENT
TR_HANDLE = 34832852
STMT_HANDLE = 34942616
PARAMS = [ ]
SECONDS = 0.561
ERRCODE = 335544721
----*/
/*---
INTERPRETE BUFFER =
ERRCODE = 53
----*/
/*---
INTERPRETE BUFFER = Unable to complete network request to host "top-
sql".
ERRCODE = 39
----*/
/*---
INTERPRETE BUFFER = Error reading data from the connection.
ERRCODE = -1
> Now, assuming that all of your client machines have gds32.dll andare
> loading it from %system%, you must ensure that each client machinehas the
> correct version of gds32.dll. The same thing applies, even if youare
> running Fb 1.0 -- where you are seeing your first problem. Makesure that
> the client machines have the correct gds32.dll for the version ofthe Fb
> server that they are connecting to. An old gds32.dll from IB 6,or IB 5.x,
> or from an older Fb 1.0 beta, will not do.Of course, I deleted previous version completelly and install FB
once again.
>Thank You very much. It is always great to read Your answers on this
> ./hb
group. Maybe You can tell me something helpfull after my post?
Wojtek