Subject | Re: [IBO] I get dbhandle always 1 (ERR Handling) |
---|---|
Author | Burak OZLER |
Post date | 2002-09-17T06:36:45Z |
Hi Jason.
I'm writing a finance application and it's multiuser. I'm trying to get meaningful err messages
from the running SP's ( I don't use Triggers much I like controllig the events). IB's event option
is not suitable for me becouse you can only get the messages when the transaction committed, this is
too late for me. When a user get's in a module a transaction starts separetaly and when the job is
done the transaction commits. There are many SP's running in a transaction. I have to get the
messages when the exception occures. I can't use exceptions also becouse it crashes the SP
execution( And I can't handle the exception from client side, If there is a chance to do it please
inform me). Most of the time I call one SP at a time and that SP call's many sp's internally. One of
The most important reaseon why I need this messages, if an exception occurs I have to roll back the
SP's for data integritiy.
Now waht will I do with database handle??
I get the transaction handle when the transaction starts. I'm trying to get the dbhandle when my
main connection connects. Wit these I'll get a two field unique (I couldn't test unique becouse I
can't get dbhandle yet) index. I'll send these two field to my all SP's and when a exception occurs.
An another SP will write the required information to a table with this informaiton. After execution
of a SP I'll read the table, if there are records about these two field, I'll decide what to do
depending to the exception states.
This is why I need dbhandle.
If you or the community have better ideas for achiving the stuation please inform me. Becouse if
I decide this way this will make me late for 2 months becouse I'm writing this app for 7 month's and
I used to plan to end this app before 2003.
Thanks
Burak OZLER
I'm writing a finance application and it's multiuser. I'm trying to get meaningful err messages
from the running SP's ( I don't use Triggers much I like controllig the events). IB's event option
is not suitable for me becouse you can only get the messages when the transaction committed, this is
too late for me. When a user get's in a module a transaction starts separetaly and when the job is
done the transaction commits. There are many SP's running in a transaction. I have to get the
messages when the exception occures. I can't use exceptions also becouse it crashes the SP
execution( And I can't handle the exception from client side, If there is a chance to do it please
inform me). Most of the time I call one SP at a time and that SP call's many sp's internally. One of
The most important reaseon why I need this messages, if an exception occurs I have to roll back the
SP's for data integritiy.
Now waht will I do with database handle??
I get the transaction handle when the transaction starts. I'm trying to get the dbhandle when my
main connection connects. Wit these I'll get a two field unique (I couldn't test unique becouse I
can't get dbhandle yet) index. I'll send these two field to my all SP's and when a exception occurs.
An another SP will write the required information to a table with this informaiton. After execution
of a SP I'll read the table, if there are records about these two field, I'll decide what to do
depending to the exception states.
This is why I need dbhandle.
If you or the community have better ideas for achiving the stuation please inform me. Becouse if
I decide this way this will make me late for 2 months becouse I'm writing this app for 7 month's and
I used to plan to end this app before 2003.
Thanks
Burak OZLER
----- Original Message -----
From: "Jason Wharton" <jwharton@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, September 16, 2002 9:03 PM
Subject: Re: [IBO] I get dbhandle always 1
> Not sure why... Why are you casting it to integer?
> What are you planning to do with it?
>
> 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: "Burak OZLER" <burak.ozler@...>
> To: <IBObjects@yahoogroups.com>
> Sent: Monday, September 16, 2002 12:59 AM
> Subject: [IBO] I get dbhandle always 1
>
>
> > Hi all
> >
> > I get dbHandle of my main connection object always 1. I run this code
> conn.afterconnect
> >
> > DB_CON_HANDLE := Integer(dbaMain.dbHandle^);
> >
> > what I'm doin wrong???
> >
> >
> > Burak OZLER