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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGridView

Status
Not open for further replies.

egodette

Technical User
Jun 12, 2002
222
US
Trying to return data to a DataGridView from an SQL2005 query. The first element is what I'm having an issue with.

select convert(varbinary, emailkey) as uid, emailaddress from emailaddress

If I leave off the "convert(varbinary, emailkey) as uid" it works perfect. With it on I get a very, very large error msg that starts with "System.ArgumentException:parameter is not valid....."
and the data returned to the GridView is a square with an "X" in it for the 1st element.

The data in the database is in the form of 7277523927762257471 that I need converted to 0x64FEF5744EACC63F.

Any ideas?? By the way the sql query works perfect in MSSQL Management studio.

 
Some more information.
In looking at the DataSet Visualizer I see that the data in element 1 is System.Byte[].

How can I get my data to show instead?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top