Re: Error -2147168227 Cannot create new transaction because capacity was exceeded.
From: Doug Stoltz (NoSpam_at_MyEmail.com)
Date: 08/04/04
- Next message: Sam Kong: "Access DB Cache?"
- Previous message: Patrick Bates: "Re: Persisted Recordsets"
- In reply to: Val Mazur: "Re: Error -2147168227 Cannot create new transaction because capacity was exceeded."
- Next in thread: Val Mazur: "Re: Error -2147168227 Cannot create new transaction because capacity was exceeded."
- Reply: Val Mazur: "Re: Error -2147168227 Cannot create new transaction because capacity was exceeded."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 4 Aug 2004 16:34:33 -0400
Thanks for the response.
No, I'm not using nested transactions. I'm specifically, trying to avoid
that in my code. Basically, I've got a wrapper class on the ADO connection
object and there is only 1 instance per application of the connection
object. The wrapper class checks a boolean to see if there is a transaction
started on the connection object. Provided the coding works it should
prevent nested transactions. I've done some SQL traces to check this out.
But I may have overlooked something.
I'll recheck again and look for this. Thanks for the tip.
FYI, I'm suspecting that resource pooling may be causing this. So I'm using
the "OLE DB Services = -4" setting to disable pooling and auto enlistment.
In addition, I've added code to set the connection = nothing before I close
the recordset. Prior to that I've just closed the ADO recordset object.
The problem is intermittant but I can force this error to happen by NOT
closing recordsets. What I'm hoping to determine is the true cause of the
problem. Is it (a) too many open recordsets on the client (b) connection
pooling is not freeing resouces on the client or (c) some other explanation?
Your input is appreciated...
Doug
"Val Mazur" <group51a@hotmail.com> wrote in message
news:eZ2tfbdeEHA.3732@TK2MSFTNGP11.phx.gbl...
> Hi Doug,
>
> Do you have nested transactions? If yes, then you cannot do this through
> OLEDB provider for SQL Server. It supports only one level. How do you
> declare, open and close connections? Could you post code here?
>
> --
> Val Mazur
> Microsoft MVP
>
>
> "Doug Stoltz" <NoSpam@MyEmail.com> wrote in message
> news:%23Z4QKbMeEHA.3512@TK2MSFTNGP12.phx.gbl...
> > If you have some information on this error please reply.
> >
> > I have been unable to find info in the Knowledge base, ADO or SQL Server
> > doc
> > on error -2147168227. I have even run searches on the error text at the
> > MSDN site and in the master.sysmessages table on my server. Google
> > searches
> > have turned up little too. If you have info on this, please tell me how
> > you
> > found it.
> >
> > The application is VB 6, ADO, using OLE DB provider (SQLOLEDB) and
MDAC
> > 2.8, and the database is SQL 2000 on an NT 4 Server machine.
> >
> > I've debugged the error to a call to: ado.BeginTrans.
> >
> > 1) Can you tell me is this a client side ADO error or server side SQL
> > Server
> > 2000 error?
> >
> > 2) Where can I find the error message info in the KB?
> >
> > 3) When I look at the Process Info in enterprise manager there are
> > multiple
> > process Id's generated by the application. My gut is telling me that I
> > have
> > too many process id's created by the ADO driver on the client side and
the
> > ADO driver generates the error. (Does this sound right to you?)
> >
> > 3b) I'm familair with SQL profiler and my research is pointing me back
to
> > the ADO driver. Do you have a suggestion to "prove" its a driver side
> > problem? Or does the error code indicate which service generated the
> > error?
> >
> > 4) It seems to me that the ADO driver is deciding to create multiple
> > connections (process id's) and is not closing them the same way as prior
> > versions. Do you know if there has been any change in this part of the
> > ADO
> > code? Do you have any ideas how I might research this part of my
> > question?
> > Is there a blog somewhere that I can speak to ADO developers at
microsoft?
> >
> > Background
> > This behavior started happening about the time I upgraded to Crystal 10
> > and
> > installed the latest MDAC. Some of the offending code has been
"tweaked"
> > to
> > explicitly call the "close" method on recordset objects and this has
> > helped.
> > In addition, I can see the connection property "multiple connections" =
> > true; Even though I'd like to limit the driver to opening only 1
> > connection.
> >
> > Cheers
> > You can email direct to dstoltz at coop-tech dot com.
> > (email address scrambled to thwart spammers)
> >
> >
> >
> >
>
>
- Next message: Sam Kong: "Access DB Cache?"
- Previous message: Patrick Bates: "Re: Persisted Recordsets"
- In reply to: Val Mazur: "Re: Error -2147168227 Cannot create new transaction because capacity was exceeded."
- Next in thread: Val Mazur: "Re: Error -2147168227 Cannot create new transaction because capacity was exceeded."
- Reply: Val Mazur: "Re: Error -2147168227 Cannot create new transaction because capacity was exceeded."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|