You’d like to call a stored proc on MS SQL that has a parameter type of TIMESTAMP within T-SQL, not ADO.NET using a VARCHAR value (e.g. ‘0x0000000002C490C8’).
What do you do?
UPDATE: This is where you have a ‘Timestamp’ value coming at you but exists only as VARCHAR. (Think OUTPUT variable on another stored proc, but it’s fixed already as VARCHAR, it just has the value of a TIMESTAMP). So, unless you decide to build Dynamic SQL, how can you programmatically change a value stored in VARCHAR into a valid TIMESTAMP?
A timestamp datatype is managed by SQL Server. I’ve never seen it used anywhere other than as a table column type. In that capacity, the column of type timestamp will give you a rigorous ordinal of the last insert/update on the row in relation to all other updates in the database. To see the most recent ordinal across the entire database, you can retrieve the value of @@DBTS or rowversion().
Per http://msdn.microsoft.com/en-us/library/ms182776(SQL.90).aspx
Hence, the volatile value of a timestamp column cannot be set and is subject to change upon any modifaction to the row. You can, however, freeze the timestamp value to a varbinary(8) value.
For example, say you had a source table and a target table.
Then, in an extraction process, you might want to capture everything that has been updated since the last time you ran the extraction process.
If you are having issues, my first guess would be that crux of your problem is in the conversion of a varchar to a varbinary(8), and not to a timestamp type.
For more info (perhaps too much) , see the comment (fourth one down) I left to the blog post http://vadivel.blogspot.com/2004/10/about-timestamp-datatype-of-sql-server.html?showComment=1213612020000