G
Guest
Hi everyone,
I need to be able to create an untyped dataset from some sql using an
OracleDataAdapter. Unfortunately, I am getting problems where the result set
contains a large number of decimal places. I get the exception:
"An unhandled exception of type 'System.Data.OracleClient.OracleException'
occurred in system.data.dll
Additional information: OCI-22053: overflow error"
The problem seems to be that internally when calling Fill, the
OracleDataReader attempts to convert the number it gets into a System.Decimal
but it does not fit.
I do not know what the sql is going to be so I cannot modify it to limit the
values returned to a certain number of decimal places.
Does anyone have any ideas how I can get around this problem?
Thanks,
Jonathan
Code sample:
OracleConnection conn = new OracleConnection("MyDataSource");
OracleCommand cmd = new OracleCommand("select 1/3 from dual");
cmd.Connection = conn;
OracleDataAdapter adapter = new OracleDataAdapter();
adapter.FillError += new FillErrorEventHandler(FillError);
adapter.SelectCommand = cmd;
DataSet ds = new DataSet();
int rowsReturned = adapter.Fill(ds);
I need to be able to create an untyped dataset from some sql using an
OracleDataAdapter. Unfortunately, I am getting problems where the result set
contains a large number of decimal places. I get the exception:
"An unhandled exception of type 'System.Data.OracleClient.OracleException'
occurred in system.data.dll
Additional information: OCI-22053: overflow error"
The problem seems to be that internally when calling Fill, the
OracleDataReader attempts to convert the number it gets into a System.Decimal
but it does not fit.
I do not know what the sql is going to be so I cannot modify it to limit the
values returned to a certain number of decimal places.
Does anyone have any ideas how I can get around this problem?
Thanks,
Jonathan
Code sample:
OracleConnection conn = new OracleConnection("MyDataSource");
OracleCommand cmd = new OracleCommand("select 1/3 from dual");
cmd.Connection = conn;
OracleDataAdapter adapter = new OracleDataAdapter();
adapter.FillError += new FillErrorEventHandler(FillError);
adapter.SelectCommand = cmd;
DataSet ds = new DataSet();
int rowsReturned = adapter.Fill(ds);