473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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(Boole an
clearDataValues, Boolean acceptChanges)
at System.Data.Common.DbDataAdapter.FillLoadDataRow(S chemaMapping
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.

Aug 8 '06 #1
0 2127

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andrew MacIntyre | last post by:
I'm seeing a bizarre situation where IndexErrors are being thrown with "tuple index out of range" error strings. The scenario is something like: l = for a, b in l: ...
1
by: Amir | last post by:
Hi all, I have a table called PTRANS with few columns (see create script below). I have created a view on top that this table VwTransaction (See below) I can now run this query without a...
10
by: jaire | last post by:
In my application I have two threads. Each of them creates a new propertygrid. In the property grid I have a property with a color editor. Whenever i am clicking on the combo box to change the...
1
by: Clark Choi | last post by:
I ran the sample application called Petstore from msdn. Everything went fine until I tested Update button on the web form to update the database through Datagrid. I have been searching the web to...
3
by: Brian Foree | last post by:
I am developing an ASP.NET application that uses Access 2000 as its backend, and have just started getting the following error on 2 ASP.NET pages that had been working until late last week (and I...
1
by: Dave | last post by:
I'm getting the following error on an EditCommand event. This code is running on production web farm and the thing is it doesn't happen all the time. If I get this error, click the back button,...
0
by: Abhi | last post by:
The applicaiton through which the service is created, doesnt give that error. To check the exact issue, I tested with a service containing this block of code. The service gives the error when...
8
by: sam | last post by:
hey everybody, this is my first time posting here. i'm pretty new to python and programming in general (as you'll soon work out for yourselves...) i'm trying to code a version of a selection...
35
by: erikwickstrom | last post by:
Hi all, I'm sorry about the newbie question, but I've been searching all afternoon and can't find the answer! I'm trying to get this bit of code to work without triggering the IndexError. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.