Link to home
Start Free TrialLog in
Avatar of jdcoburn
jdcoburn

asked on

using a byte array type in a dataset

hi -- i'm using vs 2010 and c#. i have a byte array i want to store in a data column in a table. i'm looking for how to format and program this data type. I also want to save and retrielve the data set to an xml file. i have everything working except for the byte array (i just started working with it, before i stored the array as a string and converted back and forth.) i didn't see any example code in the ms help. i also would like to know how the xml value is stored -- space deliminted, comma delimented, etc between array values.
thanks,
Jim
Avatar of jdcoburn
jdcoburn

ASKER

i should add that i'm getting "invalid length for Base 64 char array when i try and read in the xml field containing a set of numbers (the size of the data in the xml field is less than 20 bytes.)
ASKER CERTIFIED SOLUTION
Avatar of nipunu
nipunu

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok - thanks. i've gotten this far and realized that the byte[] is serialized using  base64 char encoding and it would be more convenient to have it as hexBinary. i'm reading and writing data from a dataset using the dataset designer. the type i've selected for a field in a table is byte[].  i'm using the ds.xmlRead() and ds.xmlWrite() to serialize to and from an xml file using the xml schema generated by the dataset designer. there doesn't seem to be an obvious place to change the serialization method for byte[] field. any suggestions?
it works.