Click here to Skip to main content
11,921,353 members (69,634 online)
Rate this:
Please Sign up or sign in to vote.
See more: SQL-Server
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 21: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
0 OriginalGriff 493
1 Dave Kreskowiak 220
2 phil.o 170
3 Sergey Alexandrovich Kryukov 157
4 KrunalRohit 134
0 OriginalGriff 7,036
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,286
3 George Jonsson 2,840
4 Suvendu Shekhar Giri 2,216

Advertise | Privacy | Mobile
Web04 | 2.8.151120.1 | Last Updated 16 May 2012
Copyright © CodeProject, 1999-2015
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