Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-09-03
5
Medium Priority
?
781 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
  • 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

916 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