Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Comments
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.
MAKReddy 16-May-12 4:35am    
in that column i am saving datetime but its not saving

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.
 
Share this answer
 
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900