Oracle Connection string syntax

bob.walker

Member
Joined
May 17, 2005
Messages
18
Programming Experience
3-5
[RESOLVED] Oracle Connection string syntax

Dim OraStr As String = "Data Source=Oracle8i;Integrated Security=yes"

OR

dim OraStr As String = "Provider=""MSDAORA.1"";User ID=dev;Data Source=testdb;Password=dev"

I am using oracle8i but that should be provider shouldn't it? the MSDAORA.1 is for the OLEDB so I assume it is wrong also. Any Ideas?
 
Last edited:
we would use the following

setting a reference to system.Data.OracleClient

Dim conConnection AsNew OracleClient.OracleConnection
conConnection.ConnectionString = "Data Source=suppm1.com;uid=??;password=??"

where suppm1.com is held within the tnsnames.ora file for the database details


SUPPM1.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = SUPPORTM1ORAC)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = suppm2)
)
)

does that make any sense??
 
Actually I spoke to soon. I am getting

in debugger is says "Connection.ServerVersion <error: an exception of type: {System.InvalidOperationException} occurred> String"

when displaying message it says "Object reference not set to an instance of an object"
 
Back
Top