GetBytes function

  • Hi All

    i've created a table locally from a linked server view. When try to do a select * from .... i get

    An error occurred while executing batch.

    Error message is: Invalid attempt to GetBytes on column 'MYDATE'.

    The GetBytes function can only be used on columns of type Text, NText, or Image.

    i've done some digging and found that it's fairly common when the client is 2005 and the server 2008 but i've created the table in my local instance of sql express 2005 and am querying it from there too.

    anyone?

    thanks.

  • spin (12/5/2011)


    Hi All

    i've created a table locally from a linked server view. When try to do a select * from .... i get

    An error occurred while executing batch.

    Error message is: Invalid attempt to GetBytes on column 'MYDATE'.

    The GetBytes function can only be used on columns of type Text, NText, or Image.

    i've done some digging and found that it's fairly common when the client is 2005 and the server 2008 but i've created the table in my local instance of sql express 2005 and am querying it from there too.

    anyone?

    thanks.

    What happens if you run the query using SQLCMD ?


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply