Last post Dec 11, 2011 04:43 AM by olybobo
Dec 01, 2011 06:08 PM|MattLong|LINK
I have to make my first database connection to Oracle Version: Oracle Database 11g Enterprise Edition Release 126.96.36.199.0 - 64bit Production, and I wanted to know. What is the best Data provider should I use, using VS 2005 ASP 2.0/C#?
Dec 01, 2011 06:13 PM|Careed|LINK
I would initially try to use the latest 11g provider from Oracle. If this doesn't work (likely because it's too new for ASP.NET 2.0), then I would try using either the ODBC or OLEDB provider from .NET and try to connect to your Oracle database that way.
Dec 01, 2011 09:14 PM|Lannie|LINK
Lastest ODP.NET fully supports ASP.NET 2.0/3.5 communicating with either Oracle 10g or 11g, 32-bit or 64 bit database.
You will have to install the 32-bit ODP.NET CLIENT in a new Oracle home on the web server or application server if you are running 32-bit compiled applications.
If the database is 64-bit and on the same machine as the web server, you can still use the ODP.NET 32-bit CLIENT install in a new Oracle home and run 32-bit applications.
Dec 05, 2011 09:12 PM|MattLong|LINK
I'm having a diffucult time trying to make a database connection from my application. I can connect fine using other database tools, but get errors when try to open a connection within my ASP C# application. The following is one example of the code I'm trying
<add name="Oracle_Test" connectionString="Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=Matt;Password=Long;Data Source=TestDV;OLE DB Services=-4"/>
<- Web Config
string cnstring = ConfigurationManager.ConnectionStrings["Oracle_Test"].ToString();
System.Data.OleDb.OleDbConnection m_OracleDBConn = new OleDbConnection(cnstring);
// Close Database
Error Message I'm getting now: Unspecified error: E_FAIL(0x80004005)
Dec 06, 2011 01:19 AM|Careed|LINK
Fix your cnstring line:
string cnstring = ConfigurationManager.ConnectionStrings["Oracle_Test"].ConnectionString;
Dec 06, 2011 04:14 AM|MattLong|LINK
I fixed the cnstring line, and I still get connection errors.
Dec 07, 2011 12:50 AM|Careed|LINK
Where is the error message occurring?
Dec 07, 2011 05:32 AM|MattLong|LINK
I get the following error message.
[OleDbException (0x80004005): MU???| ????T?]
System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +968297
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +86
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +29
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +4861516
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
Dec 09, 2011 02:21 AM|Careed|LINK
Have you tried using the ODP.NET classes instead of using the System.Data.OleDb classes?
Dec 09, 2011 03:10 AM|MattLong|LINK
No, where can I get an example?
Dec 09, 2011 05:42 AM|Careed|LINK
Dec 11, 2011 04:43 AM|olybobo|LINK
have you seen this thread below...it will solve your current problem