Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

connection.Open() produces error

324047Aug 15 2002
I have downloaded and installed Oracle Provider for ADO.NET 9.2.0.1.0 Beta
which installed Oracle.DataAccess.dll (Version 9.2.0.0) on my client machine.
Within my C#.NET application I have set a reference to Oracle.DataAccess and to
the three namespaces (using Oracle.DataAccess; .DataAccess.Client;
.DataAccess.Types;). I then setup the connection as follows:

string connString = "User Id=adamsp;Password=xxx;Data Source=CGE3";
OraConnection conn = new OraConnection(connString);
string select = "select bipk from gtm.users " + "where username='" + userNameText.Text + "' and sysAccess_chk=1";
OraCommand cmd = new OraCommand(select);
cmd.Connection = conn;
cmd.CommandType = CommandType.Text;

try
{
conn.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}


Debugging, I see that an exception is raised when the conn.Open() executes
(because I am pushed into the catch block). However, within that block the
exception object is null...I cannot determine what exception was raised. Nor
can I figure out another means to capture any Oracle exception. Looking at the
Connection properties in the Visual Studio Locals window, the connection
appears to be open and have no associated errors or problems. Can you suggest a
way to debug this or some other approach?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 2 2002
Added on Aug 15 2002
11 comments
1,497 views