devxlogo

Discovering if the input connection string is for the Oracle managed provider

Discovering if the input connection string is for the Oracle managed provider

' Return a boolean indicating whether the input connection string is for the ' ADO.NET's Oracle managed provider'' Examples:'   Debug.WriteLine(IsOracleProviderConnString' ("Server=myserver;Uid=myid;Pwd=mypwd;"))   ' => TrueFunction IsOracleProviderConnString(ByVal connString As String) As Boolean    connString = connString.ToLower()    Dim hasServerValue As Boolean = (connString.IndexOf("server") > -1)    Dim hasUIDValue As Boolean = (connString.IndexOf("uid") > -1)    Return hasServerValue AndAlso hasUIDValueEnd Function

devx-admin

Share the Post: