I have a dll which processes multiple rows from a query. At present it uses a datareader object. The main reason for doing this is it processes between thousands & millions of rows depending on how & when it is called.
I have avoided datatable.fill, because based on my understanding, it will load the entire cursor into memory. My latest run was 3.5 million rows with 131 columns per row. My reason for wanting to use a row, is to be able to implement multithreading, and pass each row to different threads.
I have tried creating a datatable which works but when I try;
dt.Rows.Add(objDataReader)
it returns;
Unable to cast object of type 'Oracle.ManagedDataAccess.Client.OracleDataReader' to type 'System.IConvertible'.
Is there a way to efficiently create a single datarow from a datareader object?