I have a .net solution that has a number of WebMethod procedures in various projets. A number of them are DB calls - either getting info or making changes.
Consequently there are a number of lines of code in various Projects that are identical & look like this:
strInfo = "....."
cn.connectionstring = strInfo
catch e as exception
Catch ex as SqlConnection
if cn,state <> adstateclosed then
what I would like to do is have a procedure that creates a connection that can be called from anywhere in the solution as a whole.
If somebody could give me the benefit of their experience I would appreciate it.
February 20, 2006 1:28 PM
February 22, 2006 9:06 AM