[fdo-users] FDO SDF Defect : can't filter on date
Bruno Scott
bscott at geomapgis.com
Wed Jan 2 08:32:28 EST 2008
I try to execute this type of query
select MYKEY from MYTABLE where MYDATE = 2007-01-01'
The query execution works fine but as soon as i try to fetch the first
record
i got this exception "Cannot convert string to DateTime"
Sample code:
FdoPtr<FdoISelect> sampleSelect;
FdoPtr<FdoIFeatureReader> sampleFeatureReader;
sampleSelect = (FdoISelect
*)m_connection->CreateCommand(FdoCommandType_Select);
sampleSelect->SetFeatureClassName(_T("MYTABLE"));
sampleSelect->SetFilter(_T("MYDATE = 2007-01-01'"));
FdoPtr<FdoIdentifier>queryPropertyName = FdoIdentifier::Create(_T("MYKEY"));
FdoPtr<FdoIdentifierCollection> propertyCollection =
sampleSelect->GetPropertyNames();
propertyCollection->Add(queryPropertyName);
sampleFeatureReader = sampleSelect->Execute();
sampleFeatureReader->ReadNext() // this line throw the exception
I have the same problem if i use FdoISelectAggregates
Bruno
--
View this message in context: http://www.nabble.com/FDO-SDF-Defect-%3A-can%27t-filter-on-date-tp14578427s18162p14578427.html
Sent from the fdo-users mailing list archive at Nabble.com.
More information about the fdo-users
mailing list