G
Guest
Hi,
In an asp.net app I had used the following to create a connection in various
places...
dim cn as sqlconnection = new
sqlconnection(syetem.configuration.configurationsettings.appsettinga("DBConnectString"))
Aside from whether this is the securest place to store the string, all was
working well. I then decided to tidy things up and replace the above line
with a call to a shared function which simply had the above line in it, and
the function returned the connection object.
Ok I thought, but then I started to get the following error message..
the connection is already open (state=open)
Does anybody know why this might be the case? i can't see why one is
different from the other.
Thanks,
Andy
In an asp.net app I had used the following to create a connection in various
places...
dim cn as sqlconnection = new
sqlconnection(syetem.configuration.configurationsettings.appsettinga("DBConnectString"))
Aside from whether this is the securest place to store the string, all was
working well. I then decided to tidy things up and replace the above line
with a call to a shared function which simply had the above line in it, and
the function returned the connection object.
Ok I thought, but then I started to get the following error message..
the connection is already open (state=open)
Does anybody know why this might be the case? i can't see why one is
different from the other.
Thanks,
Andy