I'm using the FillSchema method of an OleDbDataAdapter to retrieve the schema of some tables in my DB2 database. Unfortunately, columns of type Date, Time, and Timestamp are all mapped to a System.DateTime type, which is too generic for my application - I need to display the actual type (i.e Date, Time or Timestamp).
Is it possible for me to intercept the OleDbType of the column before it's mapped? And even if I can do that, how could I then store the type correctly within a DataColumn?
The System.DateTime type can represent all of the possible values of a DB2 Date, Time, or Timestamp. It should meet all of your needs. i.e. if you only want to represent the Date, then ignore the Time part of the DateTime value.
Perhaps if you explained what you want to do with the value after you fill a DataSet using FillSchema someone would be able to point you in the right direction.
If you just want to display the value, there are many methods of DateTime that allow you to display just the Date, Just the Time or the Timestamp or whatever you want.