|
-
Aug 30th, 2000, 03:55 PM
#1
Thread Starter
Member
I've noticed that in the SQL Server performance monitor, when my application starts, as I open up forms that establish connections the performance monitor shows that the number of connections is increasing. When I close the forms it doesn't look like the number of connections goes down. The connections don't go down until the program is closed.
Is there something I need to put in my code to close those connections? What ramifications are there to the connections not being closed down?
-
Aug 31st, 2000, 12:06 AM
#2
Guru
in what scope do you have your connection object? (global/module/procedure)
Does your application reside within IIS or MTS?
-
Aug 31st, 2000, 04:47 PM
#3
Thread Starter
Member
The application isn't using IIS or MTS.
I've tried the connection object as a local variable in the form load event and as a global variable. It seems to work the same way in both events.
-
Sep 1st, 2000, 09:55 AM
#4
Guru
I don't know, this code works fine for me. I have verified it using the performance monitor
Code:
Private Sub Form_Load()
Dim cn As Connection
Set cn = New Connection
cn.Open "Provider=SQLOLEDB;Data Source=W2kSRV;Integrated Security=SSPI;"
End Sub
I didn't explicitly close or release the connection object to see if this was the problem, but the implicit object destruction worked fine....
Note that I am using ADO 2.5, the native OLEDB provider for SQL server (not ODBC), and SQL Server 7 SP2
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|