ADORecordset objects in OLE DB .NET Data Provider applications
When you use ADORecordset
objects, you must know which framework is being used and how each
object you use maps to an ADORecordset object.
Considerations regarding the use of
ADORecordset objects. - The ADO type
adDBTimeclass is mapped to the .NET FrameworkDateTimeclass.OleDbType.DBTimecorresponds to aTimeSpanobject. - You cannot assign a
TimeSpanobject to anADORecordsetobject'sTimefield. This is because theADORecordsetobject'sTimefield expects aDateTimeobject. When you assign aTimeSpanobject to anADORecordsetobject, you will get the following message:
You can only populate theMethod's type signature is not Interop compatible.Timefield with aDateTimeobject, or aStringthat can be parsed into aDateTimeobject. - When you fill a
DataSetwith aADORecordsetusing theOleDbDataAdapter, theTimefield in theADORecordsetis converted to aTimeSpancolumn in theDataSet. Recordsetsdo not store primary keys or constraints. Therefore, no key information is added when filling out aDataSetfrom aRecordsetusing theMissingSchemaAction.AddWithKey.