OracleDataAdapter.Fill bug? or just not working for me?

C

Cip

Hi I am using the Microsoft .NET Provider for Oracle found in
System.Data.OracleClient.

For some reason OracleDataAdapter.Fill NEVER works (I tried it with
many different queries), it always throws an exception.

code snippet:

Dim comm As OracleCommand = Connection.CreateCommand
Dim tbl As New DataTable
Dim adapter As New OracleDataAdapter

comm.CommandText = "Select * from Test"
adapter.SelectCommand = comm

Connection.Open()
adapter.Fill(tbl)
Connection.Close()


"An unhandled exception of type
'System.Data.OracleClient.OracleException' occurred in system.data.dll
Additional information: System error."

not much help. if i add a watch on the exception, here is ex.message:
"OCI-22053: overflow error"

There is no other useful help, no other inner exceptions.

Note that this error message occurs with ANY SQL Statement I try.

Using the other objects in System.Data.OracleClient have given me no
problems; I have used DataReaders, Command.ExecuteNonQuery without
issues.

FYI: I have VS2003, .NET FW 1.1, OraClient 8.1.7.
 
M

Miha Markic [MVP C#]

Hi Cip,

Try few things:
Dim comm As new OracleCommand instead of connection.createcommand
Within select try selecting just one field.
 
P

psycho_sniper

I am getting the same error, although in my case I have been able to
find where the problem starts.
The error occurs when retrieving an OracleNumber that is outside the
allowable range: (+-)79,228,162,514,264,337,593,543,950,335.

msdn includes the following remarks for the OracleNumber.Value
property:
If you attempt to retrieve a value outside the allowable range, Oracle
returns the "OCI-22053: overflow error" message. Use the ToString
method to retrieve such values.

Unfortunately I have not yet worked out how to get around this while
still using the Fill method but if I do, I will post it.

Note: I am using VS2003, .NET FW 1.1, Oracle9i
 

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