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

From: --dweezil (dweezil_at_discussions.microsoft.com)
Date: 10/01/04


Date: Fri, 1 Oct 2004 13:03:02 -0700

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!



Relevant Pages

  • Re: Development envionment vs runtime??
    ... I don't know Oracle, but where do you open your connection? ... > Dim ConOra As OracleConnection = New OracleConnection ... > ' Execute command, create OracleDataReader object ... > An interesting note, when running the exe file on a coworkers machine, ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Operation is not valid due to the current state of the object
    ... now you are using .net 1.1, which has a built in oracle client, this might ... Try uninstalling the .net data provider for Oracle. ... > I'm getting this error when I try to access the OracleDataReader object ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • ANN: OraDirect .NET Data Provider 2.30 has released
    ... Core Lab company has recently announced new 2.30 version of OraDirect .NET ... 100% managed full-featured .NET data provider for direct ... New version provides support for Oracle 10g, Oracle XMLType data type, ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Reverse Engineer Oracle Database
    ... I donīt know much about the modeling tools of VS.NET but about Oracle: ... Microsoft Data Access Components should be installed on your ... Driver, an OLEDB Provider and a .NET Data Provider, but Microsoft components ... > Installing the appropriate Oracle database drivers from Oracle.com ...
    (microsoft.public.vsnet.general)
  • Re: Oracle .NET data provider
    ... You have 2 native Oracle .NET Data Providers. ... - The Microsoft .NET Framework Data Provider for Oracle, ... It requires Oracle 8 client. ... >I could not find Oracle .NET data provider for version 1.1. ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast