How To Pass a Timestamp to/from a SQL Stored Procedure w/ ADO (196590)
The information in this article applies to:
- ActiveX Data Objects (ADO) 1.5
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.01
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q196590 SUMMARY
A SQL Server timestamp column automatically updates every time a row is
inserted or updated. Despite the name, a SQL Server timestamp column is not
based on the system time and does not contain a date or time value.
Instead, the timestamp column is an array of binary values. The ActiveX
Data Objects (ADO) adDBTimeStamp datatype is used for dates. Since a SQL
Server timestamp is neither a date nor a time, do not use adDBTimeStamp to
retrieve or pass SQL Server timestamp values. Use adVarBinary with a size
of eight (8).
REFERENCES
For additional information, please see the following article in the
Microsoft Knowledge Base, which discusses timestamp values and Remote Data
Objects (RDO):
170380
How To Display/Pass TimeStamp Value from/to SQL Server
For additional information, please see the following article in the
Microsoft Knowledge Base, which enumerates the datatype constants used when
passing parameters and their string equivalents:
181199
How To Determine How ADO Will Bind Parameters
(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Margery Simms, Microsoft Corporation.
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | kbDatabase kbhowto KB196590 |
---|
|