Skip to main content
Published: July 06 2006, 12:00:00 AMUpdated: November 28 2020, 2:09:59 PM

When using the .NET SDK with the Integration Library sample code, when the EndDate is saved in the SQL server database, the time is all 00:00:00.000, only the date is saved.
How can I save the time also?

The problem lies in the code in "DataAccessKits.cs"
The code uses OleDbType.DBDate for all of the datetime field definitions.
Unfortunately, the type DBDate truncates the time and passes only the Date value.

Please change all OleDbType.DBDate definitions to OleDbType.DBTimeStamp and these fields will popluate correctly with both the Data and the Time values in the database.

For SDK version 447, you will find the file in the following directory (for a standard SDK installation on the C Drive):
C:\Program Files\eBay\eBay SDK v447.0 for .NET\Samples\C#\eBay.Service.SDK.Integration\DataSets\DataAccessKits.cs

For SDK version 459 and the 463 point release, you will find the file in the following directory (for a standard SDK installation on the C Drive):
C:\Program Files\eBay\eBay SDK v459.0 for .NET\Samples\C#\DatabaseSample\DataSets\DataAccessKits.cs

How well did this answer your question?
Answers others found helpful