Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataTable.Select with byte[]

Status
Not open for further replies.

SlantyOD

Programmer
Jun 11, 2002
22
0
0
CA
Hi all,

I have a DataTable that has been taken from a SQL Server table that makes extensive use of the binary datatype for primary and foreign keys. It appears that when it is brought into the ADO.NET DataTable, binary values are treated as byte arrays (byte[]). Is there a way to use DataTable.Select to find a row based on a byte[] value? I don't seem to be able to get it to work.

Thanks.
 
For the record, the only way I've been able to get around this so far is to convert all the byte[] fields into strings when I do my initial Select. I take a pretty big performance hit on the select statement, but it pays off when I can use .Select to navigate through the data later on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top