Solved

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

Posted on 2010-09-03
5
768 Views
Last Modified: 2012-05-10
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
Comment
Question by:emresamisuzer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 33594752
Please do include BEGIN....END statement in the SP.
0
 

Author Comment

by:emresamisuzer
ID: 33595077
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
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 33609791
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
 

Accepted Solution

by:
emresamisuzer earned 0 total points
ID: 33611282
I used dataset and tableadapters. Somehow existing tableadapters causes problems. Anyway, I created all the dataset again. And it solved my problem.

Thanks.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 33612497
>>Anyway, I created all the dataset again. And it solved my problem.<<
Excellent.  Now please close the question.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
XML error not understood 5 33
Classic ASP - Display returned sql output parameter 9 57
Select coumns form Data table? 3 27
t-sql left join 2 34
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question