Get the keys returned from OracleConnectionStringBuilder : OracleConnectionStringBuilder « Database ADO.net « VB.Net






Get the keys returned from OracleConnectionStringBuilder

  
Imports System.Data.OracleClient

Module Module1
  Sub Main()
    Try
      Dim connectString As String = "Server=OracleDemo;UID=Mary;Pwd=*****"

      Dim builder As New OracleConnectionStringBuilder(connectString)

      For Each key As String In builder.Keys
        Console.WriteLine(key & "=" & builder.Item(key).ToString)
      Next
    Catch ex As System.Collections.Generic.KeyNotFoundException
      Console.WriteLine("KeyNotFoundException: " & ex.Message)
    Catch ex As System.FormatException
      Console.WriteLine("Format exception: " & ex.Message)
    End Try
  End Sub

End Module

   
    
  








Related examples in the same category

1.Connection string for OracleConnectionStringBuilder