I see no reason why not. The config information is there for the entire web
project. If you find that it does not work there, create a class file with a
method GetConnString().
The latter method has some merit even if you are successful, however, as you
can change connstring locations without rewriting a lot of strConn = "X"
calls.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************
"Aymer" <Ay***@discussions.microsoft.com> wrote in message
news:A5**********************************@microsof t.com...
Sub DatabaseConnection(bol As Boolean)
If bol Then
Dim strConn As String
strConn =
ConfigurationSettings.AppSettings("ConnectionStrin g")
oDbConn = New SqlConnection(strConn)
oDbConn.Open
Else
oDbConn.Close
oDbConn = Nothing
End If
End Sub
can i access web.config in web services so i only have the connection in
one place, the web.config?
can i return a sqlconnection through a web service web method so that i
can use the same connection object by multiple other web services.
thankx in advance,
aymer