Subject | Re: [IBO] I get dbhandle always 1 (ERR Handling) |
---|---|
Author | Bojidar Alexandrov |
Post date | 2002-09-17T14:19:50Z |
Sorry, I still use IBX, but anyway
What is the problem to catch exceptions in client side ?
They come as normal exception with the text that you have defined, I use
this to display meningfull info
Also I handle some exceptions specifically (index key violations ie trying
to insert duplicate record) and parse the text and display good message,
also I have some triggers that "emmulate" index key violation because I
can't put an actual index (if there are nullable fields or more complex
criteria for duplication)
Bojidar Alexanrov
developer at
Kodar Ltd.
http://www.KodaR.net
What is the problem to catch exceptions in client side ?
They come as normal exception with the text that you have defined, I use
this to display meningfull info
Also I handle some exceptions specifically (index key violations ie trying
to insert duplicate record) and parse the text and display good message,
also I have some triggers that "emmulate" index key violation because I
can't put an actual index (if there are nullable fields or more complex
criteria for duplication)
Bojidar Alexanrov
developer at
Kodar Ltd.
http://www.KodaR.net
----- Original Message -----
From: "Burak OZLER" <burak.ozler@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, September 17, 2002 9:36 AM
Subject: Re: [IBO] I get dbhandle always 1 (ERR Handling)
> 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
>
> ----- 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
>
>
>
>
>
___________________________________________________________________________
> 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/
>
>