Click to See Complete Forum and Search --> : Connecting to a remote DB Server using OracleClient


sinan1
February 23rd, 2005, 05:30 AM
I need to connect to a remote Oracle server from ASP.NET using VB. I have found the following example from codeguru.com:

OracleConnection oracleConn = new OracleConnection();
oracleConn.ConnectionString = "user id=scott; data source=oracleSN; password=tiger";
oracleConn.Open();

This connection string assumes that Oracle is installed on the same client machine.

If I want to connect to a remote server, how do I specify the Oracle DB server name?

Thanks

mmetzger
February 23rd, 2005, 10:41 AM
That example is using a locally defined datasource name (ie, via the ODBC connection tool). If you want to change the connectivity, you'd modify the datasource.

Another option is to use the OleDb connector and create a .udl file to access the datasource.