G
Guest
I am setting up a connection to SQL2000 using the following code:
Dim maindbconnectstring As String = "Data Source=PHx19xxx;Initial
Catalog=My_Database;User Id=myid;Password=mypassword;"
dim cn as sqlconnection
cn.connectionstring=maindbconnectstring
I do the following in my class NEW routine
cn = NEW sqlconnection(maindbconnectstring)
I then execute the following code:
cn.open
do my work
cn.close
I then loop back to the cn.open again (not the actual code)
The first time it works fine. When I loop back and try to open the
connection again, I get a general connection error. I need to stop and Start
SQL 2000 in order to proceed. If I look at the connection before the second
pass, it exists and is closed but I fail when I try to open it. Any
suggestions?
Dim maindbconnectstring As String = "Data Source=PHx19xxx;Initial
Catalog=My_Database;User Id=myid;Password=mypassword;"
dim cn as sqlconnection
cn.connectionstring=maindbconnectstring
I do the following in my class NEW routine
cn = NEW sqlconnection(maindbconnectstring)
I then execute the following code:
cn.open
do my work
cn.close
I then loop back to the cn.open again (not the actual code)
The first time it works fine. When I loop back and try to open the
connection again, I get a general connection error. I need to stop and Start
SQL 2000 in order to proceed. If I look at the connection before the second
pass, it exists and is closed but I fail when I try to open it. Any
suggestions?