[mapguide-users] FDO SDF Provider : updating with expression crashes

Bruno Scott bscott at geomapgis.com
Fri Feb 2 06:05:21 EST 2007


I' trying to implement something like this using FDO using the sdf provider
  "update Parcels set ACRES=ACRES+1 where Autogenerated_SDF_ID = 1"

int                                                numUpdated;
FdoPtr<FdoIUpdate>                      sampleUpdate;
FdoPtr<FdoPropertyValueCollection> samplePropertyValues;
FdoPtr<FdoPropertyValue>              sampleNamePropertyValue;
FdoPtr<FdoValueExpression>            sampleNameValueExpression;

try{
    sampleUpdate = (FdoIUpdate
*)m_connection->CreateCommand(FdoCommandType_Update);
    sampleUpdate->SetFeatureClassName(_T("parcels"));
    sampleUpdate->SetFilter(_T("Autogenerated_SDF_ID = 1"));
    sampleNameValueExpression = (FdoValueExpression
*)FdoValueExpression::Parse(_T("ACRES+1"));
    sampleNamePropertyValue = FdoPropertyValue::Create(_T("ACRES"),
sampleNameValueExpression);

    samplePropertyValues = sampleUpdate->GetPropertyValues();
    samplePropertyValues->Add(sampleNamePropertyValue);
    numUpdated = sampleUpdate->Execute();
}
catch (FdoException * ex) {
    AfxMessageBox(_T("Fdo Exception"));
    ex->Release();
}
catch (...) {
    AfxMessageBox(_T("Unknown exception"));
}

The program crashes without beeing catched by any exception
I used the same function with King.Oracle and it work fine!

Have any idea?

Bruno

-- 
View this message in context: http://www.nabble.com/FDO-SDF-Provider-%3A-updating-with-expression-crashes-tf3160278s16610.html#a8765191
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list