Click here to Skip to main content
12,952,281 members (44,527 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi In my table i have column with timestamp datatype. here i am inserted datetime and smalldatetime and time but its not taking .

I am getting Incorrect Syntax error near datetime.

Please Help me...............
Posted 15-May-12 20:18pm
Sandeep Mewara 16-May-12 2:28am
Add what exactly you are adding and how. Show us the snippet related. Sounds like you are doing it in a wrong way.
Ajayreddy2611 16-May-12 4:35am
in that column i am saving datetime but its not saving
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The name timestamp is deprecated, the new (and more accurate) name is rowversion.

SQL Server columns of type rowversion are always generated and set by the database server.

If you use a different datatype in the target table. The values read from a rowversion column can be stored in a varbinary column. So you could create a varbinary column in the new table to hold the values from the old table. Of course, going forward this varbinary column would not get updated automatically like a rowversion column would.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,239
CHill60 3,490
Maciej Los 3,083
Jochen Arndt 1,975
ppolymorphe 1,880

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 16 May 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100