Operation is not valid due to the current state of the object

D

--dweezil

I'm using the Oracle .NET data provider in my ASP.NET application to connect
to Oracle. I am recieveing the error:

System.InvalidOperationException: Operation is not valid due to the current
state of the object.

I'm getting this error when I try to access the OracleDataReader object
variable like so...

while ( reader.Read() )
{
Response.Write (reader["field1"].ToString() ); // THIS IS WHERE THE
ERROR OCCURS!!!
}

The code runs fine in a C# console application...so it has to be an ASP.NET
issue, and I'm thinking it is probably a security setting somewhere.

Thanks for any help!
 
R

ranganh

Hi,

If you had earlier installed .NET Data Provider for Oracle initially, and
now you are using .net 1.1, which has a built in oracle client, this might
occur.

Try uninstalling the .net data provider for Oracle.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top