Icon View Incident Report

Serious Serious
Reported By: Hilary Blokker
Reported On: 8/29/2008
For: Version 2.01 Build 4
# 2776 ElevateDB .Net Data Provider Can Experience Index Out of Range with Certain Queries

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.

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.

Imports Elevate.ElevateDB.Data

Partial Class _Default
    Inherits System.Web.UI.Page

  Protected Sub btnTest_Click(ByVal sender As Object, ByVal e As System.EventArgs) 
Handles btnTest.Click
    ' Create connection
    Dim conTest As EDBConnection = New EDBConnection
      ' Try to update last record. Error occurs if record count is
a multiple of 32 and trying to update last record.
      Dim cmdTest As EDBCommand = New EDBCommand("UPDATE Responses SET Response=5 
WHERE ResponseID=32", conTest)
        ' Execute update
        Dim intRecordsAffected As Integer = cmdTest.ExecuteNonQuery()
      End Try
    End Try
  End Sub
End Class

Comments Comments
The problem was in the cost I/O estimation calculations.

Resolution Resolution
Fixed Problem on 9/2/2008 in version 2.01 build 5

Products Affected Products Affected
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial