Oracle – vb.net Oracle connection using TNS Name

connection-stringodbcoracletnsnamesvb.net

I have put my tns connection into the .ora file and am now able to conenct to it using SQL plus and can ping it :tnsping myConn.

I've also added the connection to the ODBC Manager and connecting successfully when tetsing conneciton through the ODBC tool.

now i'm having an issue making a connection to it using vb.net

i've tried the following:

  oODBCConnection = New Odbc.OdbcConnection(connStr)
            oODBCConnection.Open()

where my connStr is:

Data Source=tns.dev;User Id=MyUser;Password=MyPass;

per: http://www.connectionstrings.com/oracle and http://www.shabdar.org/c-sharp/101-connect-to-oracle-using-asp-net-and-csharp.html

what am i doing wrong? it's telling me i need to specify a driver, how do i do it?

Thank you!

the error i'm getting is:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Best Answer

Did you checked the tnsnames.ora file? Is there any entry for tns.dev?

http://www.mike-devlin.com/oracle/tnsnames_ora.htm