Get ConnectionString from App.config

Dim connections As ConnectionStringSettingsCollection = ConfigurationManager.ConnectionStrings

If connections.Count <> 0 Then

For Each connection As ConnectionStringSettings In connections

Dim name As String = connection.Name

Dim provider As String = connection.ProviderName

Dim connectionString As String = connection.ConnectionString

Next

Else

End If

Anuncios