D
Dave Sherrin
I have no problems connecting to SQL Server 2000 from VB.net and using all
it's functions. However, when I close the connection, it stays active on
the server until the application is closed. I have tried running commands
with the drop connection parameter, closing the connection with close,
dispose and setting it to nothing. Here is a sample of the code. The
results of the code below is that the connection stays active. Is there a
setting in VB, ADO.NET or SQL Server I can tweak to fix this?
thanks in advance!
Dim myConnection As New SqlConnection("data
source=SRV-DC-MULTI1;database=Technical;Integrated Security=True")
myConnection.Open()
MessageBox.Show("ServerVersion: " & myConnection.ServerVersion &
ControlChars.Cr & _
"State: " & myConnection.State.ToString())
myConnection.Close()
myConnection.Dispose()
myConnection = Nothing
MsgBox("pause 2")
it's functions. However, when I close the connection, it stays active on
the server until the application is closed. I have tried running commands
with the drop connection parameter, closing the connection with close,
dispose and setting it to nothing. Here is a sample of the code. The
results of the code below is that the connection stays active. Is there a
setting in VB, ADO.NET or SQL Server I can tweak to fix this?
thanks in advance!
Dim myConnection As New SqlConnection("data
source=SRV-DC-MULTI1;database=Technical;Integrated Security=True")
myConnection.Open()
MessageBox.Show("ServerVersion: " & myConnection.ServerVersion &
ControlChars.Cr & _
"State: " & myConnection.State.ToString())
myConnection.Close()
myConnection.Dispose()
myConnection = Nothing
MsgBox("pause 2")