Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connect To Oracle
Message
General information
Forum:
ASP.NET
Category:
Databases
Title:
Connect To Oracle
Environment versions
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01346677
Message ID:
01346677
Views:
41
I am using C# to connect to Oracle. The Admin gave me the Database name, Host, Service Name, and IP address, yet I cannot get connected.

Here's what I have:
string sProvider = "msdaora";
string sServer = "CIS-SERVER";
string sDatabase = "ORA92SID";
string sUserName = "kevin";
string sPassword = "abcdefg";


string sConnStr = 
    "Provider= " + sProvider +
    ";Data Source=" + sDatabase +
    ";User Id=" + sUserName +
    ";Password=" + sPassword + ";";


OleDbConnection oConn = new OleDbConnection();
oConn.ConnectionString = sConnStr;

try
{
	oConn.Open();
}
catch (OleDbException e)
{
	Console.WriteLine(e.Message);
	bConnected = false;
}
I'm getting "ORA-12154: TNS:could not resolve service name"

Anyone know what's wrong here?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform