G
Guest
I am using a DataTable (dt) based on a SQL Server table containing a column of type varbinary(50) named descriptor. The DataTable column for this field is base64Binary, which seems to map to System.byte[]. I then defined a DataView (dv) with dv.Sort="descriptor". I find that if I have a byte[] variable bArray, then dv.FindRows(bArray) always matches all the rows of dv and dv.Find(bArray) always returns 0 (unless dt.Rows.Count=0). I don't understand this behavior
I can do a manual search by using
for(int i=0; i<dt.Rows.Count; i++)
if ((new SqlBinary(byte[] dt.Rows["descriptor"]))==(new SqlBinary(bArray))
..
But I would like to use a DataView. Is there any way to do this
John Kane
I can do a manual search by using
for(int i=0; i<dt.Rows.Count; i++)
if ((new SqlBinary(byte[] dt.Rows["descriptor"]))==(new SqlBinary(bArray))
..
But I would like to use a DataView. Is there any way to do this
John Kane