How Do I Determine Data Types on a Rowset?

You can determine data types on a rowset at compile time or at run time.

If you need to determine data types at compile time, you are probably using a static CAccessor class. You can determine the data types manually or by using the ATL Object Wizard. If you use the wizard, this information will be available to you.

If you need to determine the data types at run time, you are probably using a dynamic or manual accessor. If you use the manual accessor, you can call GetColumnInfo on the rowset to return the column binding information, from which you can determine types.