in TDataSetProvider.BeforeUpdateRecord event:
if UpdateKind=ukInsert then
begin
if (not Database.InTransaction) then
Database.BeginTrans;
...
some updates to other tables
..
end;
Database is TAdoConnection.
In TDataSetProvider.AfterUpdateRecord I want to Commit transaction, or
Rollback it in TDataSetProvider.OnUpdateError
Problem is in line :
if (not Database.InTransaction) then
Database.BeginTrans;
Database.InTransaction returns false (this is correct because there is no
transaction opened) but when it comes to Database.BeginTrans middle-tier
fires exception : "Cannot start more transaction on this session"
?????
Can somebody help me...
Igor
Looks like Midas already open transaction before "BeforeUpdateRecord" event,
and Midas rollback it if something goes wrong.
Strange thing is why "Database.InTransaction" returns wrong result ?!?!?!
"Igor Huic" <kr...@mit-software.hr> wrote in message
news:3a742e22_1@dnews...
Good luck.
Igor Huic <kr...@mit-software.hr> escribió en el mensaje de noticias
3a7535b3_2@dnews...
Using Midas, it starts its transaction. It's not necessary to do
"Database.BeginTrans".
If you try to do that, there would be two transactions in process...of
course Error.
Midas does control over its transactions...
Regards
Jed
Guillermo A. Ramos <Guiller...@segundamano.es> escreveu nas notícias de
mensagem:3a8d339e$1_2@dnews...
"Jed Nicolau Filho" <j...@prouser.com.br> źśźgŠóślĽó news:3a8f31de_1@dnews...
> Hi Friends
>
> Using Midas, it starts its transaction. It's not necessary to do
> "Database.BeginTrans".
> If you try to do that, there would be two transactions in process...of
> course Error.
> Midas does control over its transactions...
>
> Regards
>
> Jed
>
> Guillermo A. Ramos <Guiller...@segundamano.es> escreveu nas notícias
de
> mensagem:3a8d339e$1_2@dnews...
> > If I understood you, what you want to do is to manage the transaction
> > process, in other words, control the "StartTransaction, Commit (or
> RollBack"
> > within your MIDAS Server ? If so, you must visit Dan Miser´s web site
> > http://www.distribucon.com/midas.html
> >
> > Good luck.
> >
> > Igor Huic <kr...@mit-software.hr> escribi?en el mensaje de noticias
"david" <da...@mail.deanshoes.com> wrote in message news:3a937da6_1@dnews...