when i use this code in web service for database connection
<WebMethod()> _
Public Function openConnection() As OleDbConnection
Dim con As OleDbConnection
con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("App_Data\CRM.mdb"))
If (con.State = ConnectionState.Open) Then
If (con.State = ConnectionState.Open) Then
con.Close()
End If
End If
con.Open()
...
Go to the complete details ...