J
Jim Meehan
I have a C# program that works one time and fails the next on my deployment
test system. It does not fail on my development system. The deployment
uses the installation procedure created by Visual Studio 2003. The
deployment is installing the .NET Framework ver 1.1, MSDE 2000, MDAC 2.7,
and my application. I am assuming (bad thing to do) that the install is
working, because the application works every so often.
In all cases I am adding a records to a database. In both instances it is
to an empty database and the data being added is the same. When the windows
program fails the error is always an ArgumentOutOfRangeException on the same
row add. The output from my try-catch code is:
ArgumentOutOfRangeException: System.ArgumentOutOfRangeException: Index was
out of range. Must be non-negative and less than the size of the
collection.
Parameter name: index
at System.Data.DataTable.InsertRow(DataRow row, Int32 proposedID, Int32
pos)
at System.Data.DataRowCollection.Add(DataRow row)
at WinMCDB.gdsrvmntDataTable.AddgdsrvmntRow(gdsrvmntRow row)
at MCLoader.Form1.AddGdsrvmnt(String monumnt_id, Int32 date_adj, Double
latitude, Double longitude, Double adj_elev, Double geoid_ht, Double
ellips_ht, String localCoordinateSystem)
ParamName: index, Value: null
Does anybody know why the System.Data.DataTable.InsertRow(DataRow row, Int32
proposedID, Int32 pos) method index is null? Or how I can debug this issue
with a System.Data.DataTable method InsertRow.
Jim
test system. It does not fail on my development system. The deployment
uses the installation procedure created by Visual Studio 2003. The
deployment is installing the .NET Framework ver 1.1, MSDE 2000, MDAC 2.7,
and my application. I am assuming (bad thing to do) that the install is
working, because the application works every so often.
In all cases I am adding a records to a database. In both instances it is
to an empty database and the data being added is the same. When the windows
program fails the error is always an ArgumentOutOfRangeException on the same
row add. The output from my try-catch code is:
ArgumentOutOfRangeException: System.ArgumentOutOfRangeException: Index was
out of range. Must be non-negative and less than the size of the
collection.
Parameter name: index
at System.Data.DataTable.InsertRow(DataRow row, Int32 proposedID, Int32
pos)
at System.Data.DataRowCollection.Add(DataRow row)
at WinMCDB.gdsrvmntDataTable.AddgdsrvmntRow(gdsrvmntRow row)
at MCLoader.Form1.AddGdsrvmnt(String monumnt_id, Int32 date_adj, Double
latitude, Double longitude, Double adj_elev, Double geoid_ht, Double
ellips_ht, String localCoordinateSystem)
ParamName: index, Value: null
Does anybody know why the System.Data.DataTable.InsertRow(DataRow row, Int32
proposedID, Int32 pos) method index is null? Or how I can debug this issue
with a System.Data.DataTable method InsertRow.
Jim