G
Guest
I have a question about Sql. When I run a simple open statement for a SQL database, it opens up two connections sometimes, and other times it opens up one connection. Does anyone know why this happens. Below is my source code where this is occuring. You will have to change the connection string, especially the Database and ServerName. Any help will be appreciated.
When you run the code, when the message box pops up, check the number of connections that have appeared in the sysprocesses table. There will be one or maybe two. It is really fustrating
Dim SQL_Connection As SqlClient.SqlConnectio
Dim connection_string As Strin
connection_string = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DatabaseName;Data Source=ServerName; Application Name = 'TestConnection'
SQL_Connection = New SqlClient.SqlConnection(connection_string
SQL_Connection.Open(
MessageBox.Show("The connection is open."
SQL_Connection.Close(
Thank you for your help
When you run the code, when the message box pops up, check the number of connections that have appeared in the sysprocesses table. There will be one or maybe two. It is really fustrating
Dim SQL_Connection As SqlClient.SqlConnectio
Dim connection_string As Strin
connection_string = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=DatabaseName;Data Source=ServerName; Application Name = 'TestConnection'
SQL_Connection = New SqlClient.SqlConnection(connection_string
SQL_Connection.Open(
MessageBox.Show("The connection is open."
SQL_Connection.Close(
Thank you for your help