Wednesday , May 29 2024

Invalid attempt to GetBytes on column



An error occurred while executing batch. Error message is: Invalid attempt to GetBytes on column ‘xxx’. The GetBytes function can only be used on columns of type Text, NText, or Image.


You may see an error message when you run a query against a table in a SQL Server database from SQL Server Management Studio.


In my case, the problem was to run a query that I ran against the SQL Server 2008 database from the 2005 version of SQL Server Management Studio. You must use a version of SSMS that is compatible with the version of the database that you are using.


About Ekrem Önsoy

The original article was written in Turkish by Ekrem Önsoy and translated to English by dbtut with the consent of the author. The copyright of the article belongs to the author. The author shall not be liable in any way for any defect caused by translation.

Leave a Reply

Your email address will not be published. Required fields are marked *