Subject Re: [IBO] Transaction error mystery: suspected IB_Cursor bug
Author Jason Wharton
APIFirst may not make sure there is a transaction handle present.
Calling StartTransaction does not get a handle. Setting Started to true will
do that.

StartTransaction is purely a behavioral thing for client/side components.
It's your explicit control mechanism, not physical.

I could make it so that it will make sure a handle is present though. Would
everyone agree this would be a good thing? It would only matter for methods
like the raw API ones that don't have the overhead of checking for
everything.

Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com

-- We may not have it all together --
-- But together we have it all --


----- Original Message -----
From: "Marco Menardi" <mmenaz@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, November 07, 2002 2:50 AM
Subject: [IBO] Transaction error mystery: suspected IB_Cursor bug


> If, instead of the SQL in the design time, I assign the SQL each time I
want to run the cursor, everything works fine!
> So seems to me that something is not properly resetted when I close the
cursor (Ibo 4.2Ia).
> Or maybe I have to call a different method to close the cursor...?
>
> // this works good
> crsParamPgm.SQL.Clear;
> crsParamPgm.SQL.Add('SELECT PGM_PARAMETRI.A_ID, PGM_PARAMETRI.B_ID,
PGM_PARAMETRI.PARAMETRI');
> crsParamPgm.SQL.Add('FROM PGM_PARAMETRI');
> crsParamPgm.SQL.Add('WHERE (PGM_PARAMETRI.A_ID = ''PGM'') AND
(PGM_PARAMETRI.B_ID = '''')');
> trsParametri.StartTransaction;
> crsParamPgm.APIFirst;
> crsParamPgm.Close;
> trsParametri.Commit;
>
> // this works good too!!!!!!!!
> crsParamPgm.SQL.Clear;
> crsParamPgm.SQL.Add('SELECT PGM_PARAMETRI.A_ID, PGM_PARAMETRI.B_ID,
PGM_PARAMETRI.PARAMETRI');
> crsParamPgm.SQL.Add('FROM PGM_PARAMETRI');
> crsParamPgm.SQL.Add('WHERE (PGM_PARAMETRI.A_ID = ''PGM'') AND
(PGM_PARAMETRI.B_ID = '''')');
> trsParametri.StartTransaction;
> crsParamPgm.APIFirst;
> crsParamPgm.Close;
> trsParametri.Commit;
>
> thanks
> Marco Menardi
>
>
>
___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or
InterBase
> without the need for BDE, ODBC or any other layer.
>
___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info
papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>