How to connect to Oracle DB in the user code ?

Class library usage, coding and language questions.
Posts: 5
Joined: Tue Sep 18, 2012 6:17 am

How to connect to Oracle DB in the user code ?

Post by zealoussuresh » Wed Jun 05, 2013 8:09 am

Hi Support Team,

I am facing issue in connecting to an oracle db throw user code. I am using Oracle ODBC provider

Below is the code...

Dim connectionString As String = "DRIVER={Oracle in OraClient11g_home};Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = TQW2K8R2-AP-09)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME = TEST_PRODUCTION))); User Id=TESThist; Password=TESThist;"
Dim conn As New OdbcConnection
conn.ConnectionString = connectionString

I am getting an ODBC exception - Exception.jpg attached?

I am not sure whether I am heading in the right direction. It will be great if you help me figure out how to connect to oracle db programmatically ?

Exception.jpg (72.41 KiB) Viewed 3283 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 12169
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: How to connect to Oracle DB in the user code ?

Post by Support Team » Thu Jun 06, 2013 2:19 pm


It looks like an issue related with an incorrect driver or data source.
Have you installed the correct ODBC driver (32-bit or 64-bit) from Oracle?

Have you tried to modify your connection string (see this link)?
Is it possible to connect to your data source with another tool (e.g. Visual Studio)?

Markus (T)