My company has a software designed in Visual Studio 6 using DAO and
ODBC, this software is opening too much connections to SQL Server and
maintaining them openned during too much time.
So, how can I kill the inactive connections using T-SQL?Hi
You should be calling the close method on the ADO connection object.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthclose.asp
John
"Juliano.net" wrote:
> My company has a software designed in Visual Studio 6 using DAO and
> ODBC, this software is opening too much connections to SQL Server and
> maintaining them openned during too much time.
> So, how can I kill the inactive connections using T-SQL?
>|||John, as I told you, I'm using DAO and as someone told me, connections
to ODBC are not closed when the close method of DAO classes are called.
Thanks.
Any help will be appreciated.
John Bell wrote:
> Hi
> You should be calling the close method on the ADO connection object.
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthclose.asp
> John
> "Juliano.net" wrote:
> > My company has a software designed in Visual Studio 6 using DAO and
> > ODBC, this software is opening too much connections to SQL Server and
> > maintaining them openned during too much time.
> >
> > So, how can I kill the inactive connections using T-SQL?
> >
> >|||Hi
I don't remember any issue with DAO connections!
Have you checked that you are actually executing the close method and
verified that the connection is not closed?
John
"Juliano.net" wrote:
> John, as I told you, I'm using DAO and as someone told me, connections
> to ODBC are not closed when the close method of DAO classes are called.
> Thanks.
> Any help will be appreciated.
>
> John Bell wrote:
> > Hi
> >
> > You should be calling the close method on the ADO connection object.
> >
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthclose.asp
> >
> > John
> >
> > "Juliano.net" wrote:
> >
> > > My company has a software designed in Visual Studio 6 using DAO and
> > > ODBC, this software is opening too much connections to SQL Server and
> > > maintaining them openned during too much time.
> > >
> > > So, how can I kill the inactive connections using T-SQL?
> > >
> > >
>|||John, every data access that I do on my code, I call a method to close
database connection.
John Bell wrote:
> Hi
> I don't remember any issue with DAO connections!
> Have you checked that you are actually executing the close method and
> verified that the connection is not closed?
> John
> "Juliano.net" wrote:
> > John, as I told you, I'm using DAO and as someone told me, connections
> > to ODBC are not closed when the close method of DAO classes are called.
> >
> > Thanks.
> >
> > Any help will be appreciated.
> >
> >
> > John Bell wrote:
> > > Hi
> > >
> > > You should be calling the close method on the ADO connection object.
> > >
> > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthclose.asp
> > >
> > > John
> > >
> > > "Juliano.net" wrote:
> > >
> > > > My company has a software designed in Visual Studio 6 using DAO and
> > > > ODBC, this software is opening too much connections to SQL Server and
> > > > maintaining them openned during too much time.
> > > >
> > > > So, how can I kill the inactive connections using T-SQL?
> > > >
> > > >
> >
> >|||Hi
If you are closing the connection after each command then you will be
creating un-necessary overhead. The session could stay open for the duration
of the users session! Also step through your code to make sure that the close
method is being executed and make sure there are traps for any exception
handling.
John
"Juliano.net" wrote:
> John, every data access that I do on my code, I call a method to close
> database connection.
>
> John Bell wrote:
> > Hi
> >
> > I don't remember any issue with DAO connections!
> >
> > Have you checked that you are actually executing the close method and
> > verified that the connection is not closed?
> >
> > John
> >
> > "Juliano.net" wrote:
> >
> > > John, as I told you, I'm using DAO and as someone told me, connections
> > > to ODBC are not closed when the close method of DAO classes are called.
> > >
> > > Thanks.
> > >
> > > Any help will be appreciated.
> > >
> > >
> > > John Bell wrote:
> > > > Hi
> > > >
> > > > You should be calling the close method on the ADO connection object.
> > > >
> > > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthclose.asp
> > > >
> > > > John
> > > >
> > > > "Juliano.net" wrote:
> > > >
> > > > > My company has a software designed in Visual Studio 6 using DAO and
> > > > > ODBC, this software is opening too much connections to SQL Server and
> > > > > maintaining them openned during too much time.
> > > > >
> > > > > So, how can I kill the inactive connections using T-SQL?
> > > > >
> > > > >
> > >
> > >
>
No comments:
Post a Comment