Icon View Incident Report

Serious Serious
Reported By: Pete Hollyer
Reported On: 6/26/2009
For: Version 2.02 Build 14
# 3020 ElevateDB Data Provider EDBDataReader GetBytes Method Returning Data with All Null Bytes

With the following code, the Byte Array is correct length but is all "0" thus an invalid Image when I convert the byte array to an image.

dbConn.Open();
dbCommand = new EDBCommand(SQL, dbConn);
DataReader = (EDBDataReader)dbCommand.ExecuteReader();
while (DataReader.Read())
{
    TreeNode CategoryNode = new TreeNode();
    CategoryNode.Tag = "LIST-" + DataReader.GetInt64(
DataReader.GetOrdinal("ListKey"));
    CategoryNode.Text = DataReader.GetString(DataReader.GetOrdinal("ListName"));

    //Load List Image
    Byte[] FileData = new byte[DataReader.GetBytes(
DataReader.GetOrdinal("ListImage"), 0, null, 0, int.MaxValue)];
    DataReader.GetBytes(DataReader.GetOrdinal("ListImage"), 0,
FileData, 0, FileData.Length);
    m_ListImage = FileData;
    }



Comments Comments and Workarounds
The workaround was to use the GetValue method instead and cast the result to a byte array.


Resolution Resolution
Fixed Problem on 6/28/2009 in version 2.02 build 15


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

Image