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
arameter 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.
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
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.