Begin trans / open a record set on a stored proc on sql server 
Author Message
 Begin trans / open a record set on a stored proc on sql server

Hi,

I am using ADO and i have a big pb.

I make a begintrans on the connexion object and then I call a stored proc on
a sqlserver7

and then i got error -2147467259 " impossible to create a new connection in
manual or distribued transaction " ( i translate from frenche sorry...)

All is working well if i don't call the begintrans....

I got headache..

Help !

Set mCO_Connexion = New ADODB.Connection

mCO_Connexion.Mode = adModeReadWrite

 mCO_Connexion.Open "Provider=SQLOLEDB.1;Data Source=SERV-NT;Initial
Catalog=BASETEST;User Id=toto"

ml_NiveauTrans = mCO_Connexion.BeginTrans

      Set lo_rs = New ADODB.Recordset
      Set lo_rs.Source = lo_Command ' lo_Command contains all the definition
: parameters and so on... all is working well if dont call Begintrans...
      lo_rs.LockType = adLockPessimistic
      lo_rs.CursorType = adOpenStatic
      lo_rs.CursorLocation = adUseClient

      lo_rs.Open   ''''''  Here i got the error when i call any stored proc
wich make update



Wed, 04 Jun 2003 17:28:53 GMT  
 Begin trans / open a record set on a stored proc on sql server

It is hard to say what could it be happening. However, there are a few
things that you can check including that the Distributed Transaction
Coordinator service is up and running in your SQL Server box. This service
is responsible of most of what happens regarding transactions in SQL Server.

Hope this helps

--
Gerardo Villeda
MCP, MCSD
http://www.netreach.net/~gvilleda

Quote:
> Hi,

> I am using ADO and i have a big pb.

> I make a begintrans on the connexion object and then I call a stored proc
on
> a sqlserver7

> and then i got error -2147467259 " impossible to create a new connection
in
> manual or distribued transaction " ( i translate from frenche sorry...)

> All is working well if i don't call the begintrans....

> I got headache..

> Help !

> Set mCO_Connexion = New ADODB.Connection

> mCO_Connexion.Mode = adModeReadWrite

>  mCO_Connexion.Open "Provider=SQLOLEDB.1;Data Source=SERV-NT;Initial
> Catalog=BASETEST;User Id=toto"

> ml_NiveauTrans = mCO_Connexion.BeginTrans

>       Set lo_rs = New ADODB.Recordset
>       Set lo_rs.Source = lo_Command ' lo_Command contains all the
definition
> : parameters and so on... all is working well if dont call Begintrans...
>       lo_rs.LockType = adLockPessimistic
>       lo_rs.CursorType = adOpenStatic
>       lo_rs.CursorLocation = adUseClient

>       lo_rs.Open   ''''''  Here i got the error when i call any stored
proc
> wich make update



Thu, 05 Jun 2003 07:54:49 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. begin trans - commit trans

2. Record set open from SQL stored procedure

3. Begin Transaction sets opened recordset in zombie state (alternative question: client and server side cursors)

4. Stored Proc Return values / Output Params w ADO and SQL Server 7

5. SQL Server stored proc to VB Source generator

6. Stored Proc Return values / Output Params w ADO and SQL Server 7

7. SQL Server stored proc to VB Source generator

8. running a SQL Server query or stored proc from VBS

9. Datetime Parameter to SQL Server stored proc

10. know anything about Stored Proc and using SQL Server 2000, CR8.5 and VB6.0

11. Date to SQL Server stored proc

12. Help - Using Sql Server Stored Proc with parameters

 

 
Powered by phpBB® Forum Software