Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Transactions in MIDAS

0 views
Skip to first unread message

Igor Huic

unread,
Jan 28, 2001, 9:31:34 AM1/28/01
to
I want to open transaction from RDM (I read that I should avoid controlling
transaction from client).
I'm using ADO and SQL Server 2000.
This is my code:

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

Igor Huic

unread,
Jan 29, 2001, 4:15:50 AM1/29/01
to
OK, I think I get it!

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...

Guillermo A. Ramos

unread,
Feb 16, 2001, 9:06:58 AM2/16/01
to
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
3a7535b3_2@dnews...

Jed Nicolau Filho

unread,
Feb 17, 2001, 10:21:15 PM2/17/01
to
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...

david

unread,
Feb 21, 2001, 3:35:56 AM2/21/01
to
How do write transaction in multi-tier program , can you give us
a example ?


"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

Dan Miser (TeamB)

unread,
Feb 22, 2001, 12:03:17 AM2/22/01
to
Go to the MIDAS page of my web site. There are downloads there, along with a
pointer to the MidEss project which wraps much of this up into a unit. For
background information, read this article:
http://community.borland.com/article/0,1410,22571,00.html
--
Dan Miser
http://www.distribucon.com

"david" <da...@mail.deanshoes.com> wrote in message news:3a937da6_1@dnews...

0 new messages