Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: VB7
Expertise: beginner
Aug 18, 2003

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;"))   ' => True

Function 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 hasUIDValue
End Function
Marco Bellinaso
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap