Reputation: 13
I have Oracle (10g Express Edition) installed on one pc.
Visual Studio 2008 SP1 is installed on another pc.
I want to run an ASP.NET web app that uses the remote database. The two PCs are connected by a LAN (wired) connection. How can I connect to the database? What will the connection string be? The operating system on both PCs is Windows XP.
Upvotes: 0
Views: 3033
Reputation: 9986
Try following:
string strConnectionString= "Data Source=(DESCRIPTION="
+ "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=_YOUR_SERVER_NAME_)(PORT=_YOUR_SERVER_PORT_)))"
+ "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=_YOUR_SERVICE_NAME_)));"
+ "User Id=YourUserID;Password=YourPassword;";
Upvotes: 0