Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connect To Oracle
Message
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 9.0
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01346677
Message ID:
01346771
Views:
8
Is the Oracle server on the same computer? If not try ";Data Source="+sServer+@"\" + sDatabase +
or something like that. I am not 100% sure on Oracle connections string syntax. This link should help you
http://www.connectionstrings.com/?carrier=oracle

>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?
Semper ubi sub ubi.
Previous
Reply
Map
View

Click here to load this message in the networking platform