Board index » delphi » Nested Transaction (MSSQL)

Nested Transaction (MSSQL)

Hi,

I've read that it is not possible to start 2 or more transactions on the
same connection with MSSQL driver to dbExpress.. is it right?? If not,  how
can I deal with it?
With Interbase driver works very well but MSSQL....

Example:
   cn: TSQLConnection;
   tr, tr2 : TTransactionDesc; (Diferent IDs e xilREADCOMMITTED)

cn.StartTransaction(tr);
...
    cn.StartTransaction(tr2);
    cn.Commit(tr2);

cn.Commit(tr2);

Also, do I need all the time the CloseDatasets Event??

Thanks for any help in advance..

Ricardo Costa
Florianpolis - SC
Brasil

 

Re:Nested Transaction (MSSQL)


create 2 connections

Michael

Re:Nested Transaction (MSSQL)


Ok,  but that is what I don't want to do..
I have an application running perfectly with Interbase, and I need to change
this to SQLServer with few parameters changes. That is what dbExpress is
made for ... At least is what I think...
Most of the application is working fine, but I have a connection layer
(integration) that needs one connection with more than one transaction...

Well, thanks anyway Michael..

Ricardo Costa
Florianpolis - SC
Brasil

"Michael Olschimke" <olschi...@gmx.net> escreveu na mensagem
news:3ede43bd$1@newsgroups.borland.com...

Quote
> create 2 connections

> Michael

Re:Nested Transaction (MSSQL)


Quote
"Ricardo Costa" <ricardo.co...@ionics.com.br> wrote in message

news:3ede345d@newsgroups.borland.com...

Quote
> I've read that it is not possible to start 2 or more transactions on the
> same connection with MSSQL driver to dbExpress.. is it right?? If not,
how
> can I deal with it?

This is not a dbExpress problem. The problem is that Microsoft's OLE DB
Provider for SQL Server does not support nested transactions. For more info
see:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;177138
http://support.microsoft.com/default.aspx?scid=kb;EN-GB;q306649

Andy Mackie.

Re:Nested Transaction (MSSQL)


Ok, Thanks Andy..

Other Threads