nStart = Seconds() use C:\Projects\Lagger-3d\Desurvey\Desurvey Replace all Elev With 23.99 Use In Desurvey ? Seconds() – nStartIt took 8.47 seconds in Visual FoxPro 6.
{ char szFilters[]= "Drillhole data (*.dbf) | All Files (*.*)|*.*||"; CFileDialog fileDlg (TRUE, "dbf", "*.dbf", OFN_FILEMUSTEXIST| OFN_HIDEREADONLY, szFilters, this); if( fileDlg.DoModal ()==IDOK ) { CString pathName = fileDlg.GetPathName(); CString fileName = fileDlg.GetFileTitle (); _ConnectionPtr spCON = NULL; try{ time_t ltime, ltime2; time(<ime); //start time ::CoInitialize(NULL); CREATEiNSTANCE(spCON,Connection); HRESULT hr = spCON->Open("Provider=vfpoledb.1;Data Source="+ (_bstr_t) pathName, "", "", adOpenUnspecified); if(!SUCCEEDED(hr)) { MessageBox("Could not read from the file: \"" + pathName + "\"", "Ali Marandi", MB_OK); return; } _CommandPtr cmd = NULL; _variant_t vNull(0L); vNull.vt=VT_ERROR; vNull.scode=DISP_E_PARAMNOTFOUND; cmd.CreateInstance(__uuidof(Command)); cmd->ActiveConnection=spCON; cmd->CommandType=adCmdText; cmd->CommandText = "UPDATE "+ (_bstr_t) fileName +" SET Elev = 23.99"; cmd->Execute(&vNull,&vNull,adCmdUnknown); IADORecordBinding *picRs = NULL; spCON->Close(); time(<ime2); char buffer[200]; sprintf(buffer, "Time in seconds \t%ld\n", ltime2 - ltime ); MessageBox(buffer); } catch( _com_error &e){ _bstr_t bstrSource(e.Source()); _bstr_t bs = _bstr_t(" Error: ") + _bstr_t(e.Error()) + _bstr_t(" Msg: ") + _bstr_t(e.ErrorMessage()) + _bstr_t(" Description: ") + _bstr_t(e.Description()); MessageBox(bs); } } }It took 10 seconds.