System.Data.OracleClient bug

S

Sergey

what do you recommend how to fix this problem?

=======================================
OracleDataAdapter.Fill method doesn't work against Oracle
7.3 server.

An oracle error occures: ORA-01002: Fetch out of sequence.

The way to reproduce the problem:

1. Server-side script
-----------------------------------------------------
CREATE TABLE TEST
(
TESTCOL VARCHAR2(30)
)

/

insert into test (testcol) values ('123');
commit;
-----------------------------------------------------
2. Client code

using System;
using System.Data;
using System.Data.OracleClient;

namespace OracleError
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
string cnnString="Data Source=OracleServer;User
Id=USERNAME;Password=USERPASS;Enlist=false;";
string cmdText="SELECT * FROM TEST";

OracleConnection cnn=new OracleConnection(cnnString);
OracleCommand cmd=new OracleCommand();
OracleDataAdapter adp=new OracleDataAdapter(cmd);
DataSet ds=new DataSet();

cmd.Connection=cnn;
cmd.CommandText=cmdText;

try
{
cnn.Open();
adp.Fill(ds);
cnn.Close();
}
catch (System.Data.OracleClient.OracleException err)
{
System.Console.Write(err.Message);
}


}
}
}
 
S

Sergey

If I change Data Providers from Microsoft .NET Managed
Provider for Oracle to OleDb this sample works well againts
Oracle 7.3 server.
What's wrong with Microsoft .NET Managed Provider for
Oracle??? Is It work or not???
 
J

Jason Penniman

Sergey-

The managed Oracle provider requires Oracle 8.1.7 or higher. You'll have to
stick with the OleDb provider for 7.3.

-Jason
 

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

Top