Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-02-2006, 02:22 PM   #1
Member (8 bit)
 
Join Date: Jun 2001
Posts: 169
Connect to remote Oracle DB with C#?

Hey all,
I'm a complete n00b with C# and using the ODB.NET stuff, but i was looking at the basic tutorials on connecting to an Oracle DB. The thing is, they all seem to have a local DB running. what i mean is, in the line:

con.ConnectionString = "User Id=scott;Password=tiger;Data Source=orcl9i;";

they have Data Source as just the orcl9i.

my database is indeed 9i, but i have to connect to it thru a remote connection...so, lets just say for example the DB is connecatble at oracle-db.remote.edu and i have the login name and pw.

What do i do to connect to this? Just replace the orcl9i with my remote location?
Randomaxess is offline   Reply With Quote
Old 04-02-2006, 03:05 PM   #2
Member (8 bit)
 
Join Date: Jun 2001
Posts: 169
using the following code:

string oradb = "Data Source=(DESCRIPTION="
+ "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=csil-server1.cs.uiuc.edu)(PORT=1521)))"
+ "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCL)));"+ "User Id=xxxx;Password=xxxx;";

i get the following error:

ORA-12560: TNSrotocol adapter error

any ideas?
Randomaxess is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:07 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2