Search Results

Search found 3 results on 1 pages for 'tdatasetprovider'.

Page 1/1 | 1 

  • "either bof or eof is true or the current record has been deleted.." error on applyupdates that cont

    - by AhmetC
    Hello, I am getting this error while resolving delete operation from ClientDatset to TAdoDataset (which bound to access table). I am using Delphi 2010. My DatasetProvider between TClientDataset and TAdoDataset : object dspTarifeler: TDataSetProvider DataSet = DM.qryTarifeler ResolveToDataSet = True Options = [poPropogateChanges, poUseQuoteChar] end Error occurs in this function which is called by TDataSetResolver.EndUpdate(); procedure TCustomADODataSet.InternalGotoBookmark(Bookmark: Pointer); begin Recordset.Bookmark := POleVariant(Bookmark)^; end;

    Read the article

  • EUpdateError exception not recognized when raised in TDatasetProvider.OnUpdateError. Why?

    - by max
    When I re-throw a EUpdateError exception in the TDatasetProvider.OnUpdateError event, it is not recognized as EUpdateError exception in the catch block. It's only recognized as base Excption. try ... //calls the TDatasetPorvider.OnUpdateError event. myClientDataSet.ApplyUpdates(0); ... except on ex: EUpdateError do begin //never goes here //Evaluate ex.ErrorCode end; on ex: Exception do begin //always goes here //the expression (ex is EUpdateError) returns false; end; end; Hiere is the corresponding .OnUpdateError implementaion: procedure MyDataModule.MyDatasetProviderOnUpdateError(..;E: EUpdateError;...); beign //Here, the expression (E is EUpdateException) returns true; raise E; end; The exception is re-thrown, but as it seems the EUpdateError is transformed into a plain base Execption. Does anybody know, why the class type get lost? I would need that type in order to check the .ErrorCode to know what went wrong and to prepare the proper user message.

    Read the article

  • Trapping errors in TClientDataSet.CommandText

    - by Rob McDonell
    I have a TClientDataSet connected to a TDataSetProvider, which in turn is connected to a TAdsTable. I set the SQL command and then open the ClientDataset something like this: try CDS.CommandText := 'SELECT * FROM tablename WHERE fieldname = 1'; CDS.Open except // trap exception here - this never gets executed! end; If the SQL statement in CommandText fails, however (syntax error or whatever) I get an exception within the Advantage code, but it never gets caught in my own exception handling code. Is there any way for me to trap this error and report it nicely to the user. Alternatively is there a way to verify the syntax of an SQL query before executing it? I'm using Delphi Pro 2009, and Advantage Local Server 9.

    Read the article

1