Asp.Net DataBinding Returns System.Byte[] Instead Of Value
We are in the process of moving from a Windows 2003 server to a Windows 2008 server for our intranet and one column in one page of ASP.net code was returning System.Byte[] instead of the appropriate value. This only happened on the 2008 server and the 2003 rendered the data correctly. Apparently this is an issue when your database is MySQL, as mine is so you have to wrap the offending data in a CAST. Such as this simple example:
SELECT column1, CAST(column2, AS CHAR) FROM table
Once you have CAST the value to a CHAR it will work correctly again.
I am using ODBC connection to the MySQL database and on the 2003 box it is MySQL ODBC 3.51.12 Driver and on the 2008 box it is MySQL ODBC 5.1.4 Driver. Could it be the ODBC driver that causes the issue? Maybe but I am not willing to take the time to try different ODBC drivers for something that a CAST statement fixes.