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
adDBTime
class is mapped to the .NET FrameworkDateTime
class.OleDbType.DBTime
corresponds to aTimeSpan
object. - You cannot assign a
TimeSpan
object to anADORecordset
object'sTime
field. This is because theADORecordset
object'sTime
field expects aDateTime
object. When you assign aTimeSpan
object to anADORecordset
object, you will get the following message:
You can only populate theMethod's type signature is not Interop compatible.
Time
field with aDateTime
object, or aString
that can be parsed into aDateTime
object. - When you fill a
DataSet
with aADORecordset
using theOleDbDataAdapter
, theTime
field in theADORecordset
is converted to aTimeSpan
column in theDataSet
. Recordsets
do not store primary keys or constraints. Therefore, no key information is added when filling out aDataSet
from aRecordset
using theMissingSchemaAction.AddWithKey
.