Board index » delphi » Multiple Transactions with ADO using MS SQL Server 7.0

Multiple Transactions with ADO using MS SQL Server 7.0

Hallo,

i'm using in ADO the Driver for SQL-OLE-DB to work with Databases on
MS SQL Server 7.0

I can start only one transaction and commit or rollback it.
But i can not start another transaction into an existing transaction
like in VB (using same diver in ADO).

Like in this Code:

adcn.BeginTrans  ' OK!

' do something
'call a fuintion having an own transaction

.. adcn.BeginTrans ' ERROR!!!!!

Should i have special parameters in ConnectionString?
My Connection-String is:

Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
Catalog=InfoManager;Data Source=(local)

What is wrong here? Many thanks for any help

Greetings,
C.

 

Re:Multiple Transactions with ADO using MS SQL Server 7.0


For what it's worth, I use nested transactions via ADO on an Access 2000
database with no problems whatsoever.

Quote
"Schwarkopf" <Cyan...@edjay.de> wrote in message

news:3cd56966.12735803@news.t-online.de...
Quote
> Hallo,

> i'm using in ADO the Driver for SQL-OLE-DB to work with Databases on
> MS SQL Server 7.0

> I can start only one transaction and commit or rollback it.
> But i can not start another transaction into an existing transaction
> like in VB (using same diver in ADO).

> Like in this Code:

> adcn.BeginTrans  ' OK!

> ' do something
> 'call a fuintion having an own transaction

> .. adcn.BeginTrans ' ERROR!!!!!

> Should i have special parameters in ConnectionString?
> My Connection-String is:

> Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
> Catalog=InfoManager;Data Source=(local)

> What is wrong here? Many thanks for any help

> Greetings,
> C.

Re:Multiple Transactions with ADO using MS SQL Server 7.0


Extracted from SQL Server books online:
"Committing inner transactions is ignored by Microsoft? SQL Server?. The
transaction is either committed or rolled back based on the action taken
at the end of the outermost transaction. If the outer transaction is
committed, the inner nested transactions are also committed. If the
outer transaction is rolled back, then all inner transactions are also
rolled back, regardless of whether or not the inner transactions were
individually committed."

Quote
Schwarkopf wrote:
> Hallo,

> i'm using in ADO the Driver for SQL-OLE-DB to work with Databases on
> MS SQL Server 7.0

> I can start only one transaction and commit or rollback it.
> But i can not start another transaction into an existing transaction
> like in VB (using same diver in ADO).

> Like in this Code:

> adcn.BeginTrans  ' OK!

> ' do something
> 'call a fuintion having an own transaction

> .. adcn.BeginTrans ' ERROR!!!!!

> Should i have special parameters in ConnectionString?
> My Connection-String is:

> Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial
> Catalog=InfoManager;Data Source=(local)

> What is wrong here? Many thanks for any help

> Greetings,
> C.

--
Guillermo Casta?o Acevedo
Gerente de Sistemas - Grupo Millennium Ltda
Guiller...@GrupoMillennium.com
http://www.GrupoMillennium.com

Other Threads