Byte Array to DataRow! RRS feed

  • Question

  • Hi,

    I have an array of object and one value in the object array is a Byte array.

    Now I want to convert the object array into DataRow.

    This is my code

    private static DataRow GetDataRow(object[] objectValues, DataView dv)
    //dv has schema details of the table, i.e the name of columns and stuff.
    //Commons._ColumnName is a simple enum

                DataTable table = new DataTable();            
                for (int i = 0; i < objectValues.Length; i++)
                    table.Columns.Add(dv[ i ][Commons._ColumnName].ToString());
                return table.Rows[0];

    I get all the other values in the DataRow except the ByteArray details.  What am I doing wrong?
    Monday, September 15, 2008 12:36 PM