Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread ElevateDB 2 .Net Data Provider Update Problem
Wed, Aug 27 2008 4:05 PMPermanent Link

Hilary Blokker
I've run into an "Index was outside the bounds of the array" error when updating an
ElevateDB table using the .Net Data Provider with Visual Studio 2005 and ASP.Net. It
appears that I can cause this error when ever I try to update the last record in the
table, and the table record count is a multiple of 32.

e.g.
   Dim cmdUpdate As EDBCommand = New EDBCommand("UPDATE Responses SET Response = 1 WHERE
ResponseID = 96", cnConnection)
   cmdUpdate.ExecuteNonQuery()

If the last record isn't a multiple of 32, I don't get the error. If I add a record to the
table so that the record count is no longer a multiple of 32, the error goes away.

Here's the error details:

Elevate.ElevateDB.Data.EDBException was unhandled by user code
 ErrorCode=9999
 ErrorColumn=0
 ErrorLine=0
 ErrorMsg=""
 Message="Index was outside the bounds of the array."
 Source="Elevate.ElevateDB.Data"
 StackTrace:
      at Elevate.ElevateDB.Data.EDBCommand.Execute()
      at Elevate.ElevateDB.Data.EDBCommand.ExecuteNonQuery()
      at Data.SQLUpdate(EDBConnection cnConnection, String strUpdate) in
C:\Projects\Development\Sigma\validation\ezcorp\site\App_Code\data.vb:line 173
      at ResponseData.SetResponse(Int32 UserID, String Identifier, Int32 Response) in
C:\Projects\Development\Sigma\validation\ezcorp\site\App_Code\responsedata.vb:line 46
      at esq8.SaveStatement(ResponseData Data, Int32 UserID, String Identifier, Int32
SubItem, Int32 Most, Int32 Least) in
C:\Projects\Development\Sigma\validation\ezcorp\site\esq8.aspx.vb:line 79
      at esq8.SaveAnswers() in
C:\Projects\Development\Sigma\validation\ezcorp\site\esq8.aspx.vb:line 130
      at esq8.btnNext_Click(Object sender, EventArgs e) in
C:\Projects\Development\Sigma\validation\ezcorp\site\esq8.aspx.vb:line 149
      at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
      at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
      at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
      at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
String eventArgument)
      at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
      at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
Wed, Aug 27 2008 5:48 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hilary,

<< I've run into an "Index was outside the bounds of the array" error when
updating an ElevateDB table using the .Net Data Provider with Visual Studio
2005 and ASP.Net. It appears that I can cause this error when ever I try to
update the last record in the table, and the table record count is a
multiple of 32. >>

Could you please email me the table that you're using for the UPDATE ?

Thanks,

--
Tim Young
Elevate Software
www.elevatesoft.com

Image