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.