odt.net

Oracle Connection in C# - connection string

£可爱£侵袭症+ 提交于 2019-12-11 00:26:37
问题 I'm currently trying to build an application in C# and connecting it to a live db running in Oracle 11g. I have the following connection details Host IP: 10.204.1.3 Port: 1521 DB Name: PROD My source code string connString = "DATA SOURCE=10.204.1.3:1521/PROD;PERSIST SECURITY" + "INFO=True;USER ID=username; PASSWORD=userpass"; OracleConnection conn = new OracleConnection(connString); conn.Open(); I was able to add a connection in Server Explorer with the Connection String used by VS but is

Program defensively against ODAC instantclient

安稳与你 提交于 2019-12-08 04:07:15
问题 I'm trying to isolate the oracle-client to the application by xcopying the instantclient and setting environment-variables for ORACLE_HOME and PATH in global.asax.cs as described here and here, but still get [OracleException (0x80004005): The provider is not compatible with the version of Oracle client] when running on the server. Is there some way to programmatically check client and provider to give a more descriptive error-message? EDIT This post has a start. It lists three causes for the

Program defensively against ODAC instantclient

喜欢而已 提交于 2019-12-07 23:56:27
I'm trying to isolate the oracle-client to the application by xcopying the instantclient and setting environment-variables for ORACLE_HOME and PATH in global.asax.cs as described here and here , but still get [OracleException (0x80004005): The provider is not compatible with the version of Oracle client] when running on the server. Is there some way to programmatically check client and provider to give a more descriptive error-message? EDIT This post has a start. It lists three causes for the error. I did a blog post on this very thing. I used it in our DAL to prevent connections to non