Início > SQL, T.I. > SQL Server tip

SQL Server tip

Just a quick post in case anyone else is having the same problem that I had.
If you execute a query  like this on a SQL Server 2008 database from a SSMS 2005:

SELECT TOP 10 *
FROM AdventureWorksDW2008.dbo.DimCustomer

and get the following error message:

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

Notice that’s probably because you are connected to the 2008 instance with a 2005 SSMS client.

Apparently, date fields cannot be bound to a SSMS 2005. That’s probably (not sure, just guessing) due to the fact that it is a new data type on SQL Server 2008.

Categories: SQL, T.I.
  1. Ainda sem comentários.
  1. No trackbacks yet.

Deixar uma resposta

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Modificar )

Imagem do Twitter

You are commenting using your Twitter account. Log Out / Modificar )

Facebook photo

You are commenting using your Facebook account. Log Out / Modificar )

Connecting to %s

Seguir

Get every new post delivered to your Inbox.