PC Review


Reply
Thread Tools Rate Thread

DataAdapter.fill throwing an "Index out of range error"

 
 
dalaeth@gmail.com
Guest
Posts: n/a
 
      8th Aug 2006
I have searched Google high and low and haven't found anything that
works. Here's my problem, hopefully someone will be able to help!

I'm using 1.1 Framework, and ODP.NET 9.5.0.7 on a Windows 2003 Server.

I have a cached DataSet that I fill using an OracleDataAdapter. Changes
are made to that dataset in memory and as rows are changed, they are
updated back to the database using OracleDataAdapter.Update(DataRow).

Every few minutes, I refresh the cached queue from the database by
calling a subsequent OracleDataAdapter.Fill(). Most of the time, this
works fine. Occasionally - and I have not been able to pinpoint the
conditions when it happens - the fill command will hang.

It gives me an Index out of Range error at:
at System.Collections.ArrayList.get_Item(Int32 index)
at System.Data.DataTable.RecordStateChanged(Int32 record1,
DataViewRowState oldState1, DataViewRowState newState1, Int32 record2,
DataViewRowState oldState2, DataViewRowState newState2)
at System.Data.DataTable.SetOldRecord(DataRow row, Int32
proposedRecord)
at System.Data.DataTable.CommitRow(DataRow row)
at System.Data.DataTable.LoadDataRow(Object[] values, Boolean
fAcceptChanges)
at System.Data.Common.SchemaMapping.LoadDataRow(Boolean
clearDataValues, Boolean acceptChanges)
at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping
mapping)

The code that I am using to refresh the cached dataset is:

public static void Execute(){
try{
Log.Add("INFO", "Data Sync Start");
OracleDataAdapter dbAdapter =
(OracleDataAdapter)CachedQueue.getQueueAdapter();
dbAdapter.ContinueUpdateOnError = true;
DataSet ds = CachedQueue.getQueue();
dbAdapter.FillError += new
FillErrorEventHandler(dbAdapter_FillError);
Log.Add("DEBUG", "Filling Cached Queue");
int i = dbAdapter.Fill(ds);
Log.Add("INFO", i + " items refreshed in cache");
Log.Add("INFO", "Data Sync Finish");
} catch (System.Exception e){
Log.Add("ERROR", e.StackTrace);
}
}

This is running in a Background thread. The thread itself seems to die
completely. Restarting the Application pool restarts the process and
it continues on its way until this happens again.

The dataset itself is a select from one table, with one additional
computed column added.

I would be very grateful if someone could help point me in the right
direction.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OracleDataAdapter.Fill throwing "Index out of Range" error dalaeth@gmail.com Microsoft ADO .NET 0 8th Aug 2006 02:42 AM
Director player error "index out of range" =?Utf-8?B?a2lzbWV0?= Windows XP Games 1 13th Dec 2005 03:31 AM
Intermittent "Index was out of range." error =?Utf-8?B?RGF2ZQ==?= Microsoft ASP .NET 1 21st Jul 2005 01:45 PM
"Index was out of range" error when editing DataRow Jon Fairchild Microsoft ADO .NET 3 16th Jun 2004 09:38 PM
"Index Was Out of Range" Error Message from the DataGrid Clark Choi Microsoft ASP .NET 1 10th Jan 2004 03:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:29 AM.