I have exported a table from Access 2007 to SQL server 2008 in which some columns were dates and some time. In SQL Server these were automatically formatted as datetime, which is not very usefull when half of the data for this format is missing.
I therefore altered the columns to 'date' or 'time' formats as appropriate. This apparently went well, but when I subsequently attemt to run the command
SELECT * FROM dbo.skadessedler,
I get the following error message (translated below):
An error occurred while executing batch. Error message is: Der blev gjort et ugyldigt forsøg på at bruge GetBytes i kolonnen 'Dato_skadestue'. Funktionen GetBytes kan kun bruges i kolonner af typen Text, NText eller Image.
This translates to something like:
An error occurred while executing batch. Error message is: An invalid attempt was made at using GetBytes on the column 'Dato_skadestue'. The function GetBytes kan only be used in columns of the types Text, NText or Image.
'Dato_skadestue' is one of the columns which I format as 'date'.
Can someone explain to me, what is going on? The select statement works fine before I change the columns to 'date' and 'time'.
It may be relevant that I access the SQL Server 2008 from Management Studio Express 2005 with the add-ons necessary to access Server 2008. Can thís be what causes the error message?
I therefore altered the columns to 'date' or 'time' formats as appropriate. This apparently went well, but when I subsequently attemt to run the command
SELECT * FROM dbo.skadessedler,
I get the following error message (translated below):
An error occurred while executing batch. Error message is: Der blev gjort et ugyldigt forsøg på at bruge GetBytes i kolonnen 'Dato_skadestue'. Funktionen GetBytes kan kun bruges i kolonner af typen Text, NText eller Image.
This translates to something like:
An error occurred while executing batch. Error message is: An invalid attempt was made at using GetBytes on the column 'Dato_skadestue'. The function GetBytes kan only be used in columns of the types Text, NText or Image.
'Dato_skadestue' is one of the columns which I format as 'date'.
Can someone explain to me, what is going on? The select statement works fine before I change the columns to 'date' and 'time'.
It may be relevant that I access the SQL Server 2008 from Management Studio Express 2005 with the add-ons necessary to access Server 2008. Can thís be what causes the error message?