Hi, I experience some troubles trying to convert an object,returned by a DataTable for a field value to its actual representation of Byte[]. The field values in a DataTable as we all know are returned as instance of the Object class and it is up to the developer to cast it to its actual type.
In my case i access a field of type text in the database and obviously the driver converts it into byte array. Unfortunaletly a construct like this
Array arr = (Array)dt.Rows[0]["FieldName"
always results in a CastNotValidException
However the dt.Rows[0]["FieldName"].ToString() returns "System.Bute[]", which actually prompts for the actual type
Any hints on how to solve this problem appreciated
Thanks in advance
Svetoslav