id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
2691	OGR PGeo driver should recognize datetime fields as OFTDateTime rather than OFTString	jjr8	warmerdam	"(I am unsure what component this ticket should be categorized as. Please adjust as appropriate.)

Currently, MS Access datetime fields are recognized as OFTString. See OGRPGeoLayer::!BuildFeatureDefn() in [source:/trunk/gdal/ogr/ogrsf_frmts/pgeo/ogrpgeolayer.cpp@15662#L101]):

{{{
#!C
        switch( poStmt->GetColType(iCol) )
        {
          case SQL_INTEGER:
            oField.SetType( OFTInteger );
            break;

          case SQL_BINARY:
          case SQL_VARBINARY:
          case SQL_LONGVARBINARY:
            oField.SetType( OFTBinary );
            break;

          case SQL_DECIMAL:
            oField.SetType( OFTReal );
            oField.SetPrecision( poStmt->GetColPrecision(iCol) );
            break;

          case SQL_FLOAT:
          case SQL_REAL:
          case SQL_DOUBLE:
            oField.SetType( OFTReal );
            oField.SetWidth( 0 );
            break;

          default:
            /* leave it as OFTString */;
        }
}}}

Datetime fields are essential for many applications. For certain applications, the caller will not know the field type ahead of time and will want to get it from OGR. As a workaround, the caller can try to parse a date and then conclude that the field contains dates, but this cumbersome and does not work in all situations.

Please update the PGeo driver to recognize datetime for GDAL 1.6.0. If there are no developer resources for this, I may be able to contribute a fix. Having datetime support for ESRI personal geodatabases is pretty important for my application and it would be better to fix OGR than to kludge up a workaround in my own code.
"	defect	closed	normal	1.6.0	OGR_SF	svn-trunk	normal	fixed	pgeo odbc	
