How to work with ODBC for Oracle

This article deals with the basics of connection string related to ODBC for Oracle.
  • 2151

Upgraded Version

The command given below is the command for the upgraded version of the ODBC for Oracle.

Driver={Microsoft ODBC for Oracle};Server=myServerAddress;Uid=myUsername;Pwd=myPassword;

Direct connection

The given below is used for connecting the program with the ODBC. Here no Data source name(DSN) or Transparent Network Substrate (TNS) is required. So to use it in your program use the following commnad.

Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=;Uid=myUsername;Pwd=myPassword;

Omitting TSN.ora alternative

The command given below is another command which does not use TSN.ora.

Driver={Microsoft ODBC for Oracle};CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=server)(PORT=7001))(CONNECT_DATA=(SERVICE_NAME=myDb)));Uid=myUsername;Pwd=myPassword;

Further Readings

You may also want to read these related articles.

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.