Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 828
  • Last Modified:

The version of SQL Server in use does not support datatype 'datetimeoffset'

Hi,

I got the following error in an insert query. I use Visual Studio 2008 and Sql Server 2008 Express edition
Actually the database was in a Sql Server 2005 database. I created a backup and restored it into MSSQL 2008 db. Changed the compatibility to Sql Server 2008.
One more note. I can insert datetimeoffset values with running the stored procedure manually.

Error
The version of SQL Server in use does not support datatype 'datetimeoffset'



CREATE PROCEDURE [dbo].[SpValueInsert]
(
	@ID_ResultCode bigint,
	@TheTime datetimeoffset,
	@Value decimal(18, 3)
)
AS

SET NOCOUNT OFF;
INSERT INTO [dbo].[Values] ([ID_ResultCode], [TheTime], [Value]) VALUES (@ID_ResultCode, @TheTime, @Value)

Open in new window

0
emresamisuzer
Asked:
emresamisuzer
  • 2
  • 2
1 Solution
 
Easwaran ParamasivamCommented:
Please do include BEGIN....END statement in the SP.
0
 
emresamisuzerAuthor Commented:
Nothing changed.

I created a new dataset and I was able to insert with it. But I have lots of definitions in my current dataset and I don't want to re-create all of them again.
0
 
Easwaran ParamasivamCommented:
DataAdapter's ExecuteNonQuery() method has to be used to execute the insert statement. I don't know why do you fill the dataset. Could you send me the code snippets you are working on so that I could get clear picture?
 
 
 
0
 
emresamisuzerAuthor Commented:
I used dataset and tableadapters. Somehow existing tableadapters causes problems. Anyway, I created all the dataset again. And it solved my problem.

Thanks.
0
 
Anthony PerkinsCommented:
>>Anyway, I created all the dataset again. And it solved my problem.<<
Excellent.  Now please close the question.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now