Cannot find record error on ApplyUpdates

Davidl

Member²
I have a three-tier app, using TClientDataSet on the client application side, to a TOracleProvider and TOracleDataSet pair on the server side. Both in Delphi 4. As part of my client side application, I am using the 'briefcase model' functionality of client datasets whereby you can download to saved binary files, and run disconnected from the server & database, with the application by loading the files into the client datasets, making changes which get stored in its delta and then applying the changes back to the database at a later time. When using the BDE as the database connectivity tool to access my Oracle database, this worked fine, but with a DOA converted server side, it does not. On attempting to apply the stored file changes back to the server, I get "cannot find record". Any ideas on either how I fix this, or where I would dig in the code to investigate the location of the failure ?
 
Perhaps you have enabled the TDataSetProvider.ResolveToDataSet property? This will not work with the briefcase model.
 
In Delphi 4, its a TProvider that has ResolveToDataset. This property didn't seem to get added to a TDataSetProvider until Delphi 5. Either way, I'm using a TOracleProvider, which is inherited from a TCustomProvider, and therefore does not have this property. Any other suggestions ?
Thanks
 
Further investigations :

Briefcase file saved after a SELECT * FROM Table using a BDE TQuery - the resultant file contains extra information ( specifically the name of the table ) than the same select statement from the same table run through a TOracleDataSet.

Attempting to apply delta changes to the TQuery produced file works to a TProvider object. Attempting to apply delta changes to the DOA TOracleDataSet produced file will NOT apply - as it gets "Unable to resolve records. Table name not found".

Using a TDataSetProvider to apply the DOA produced saved file produces the error "Unable to find record. No key specified". This is because the Delta data packet being accessed in the provider.pas code has no pfInKey specified.

The TProvider / TDataSetProvider / TOracleProvider all seem to do very different work in attempting to apply the offline changes.

How is this all supposed to work ? I thought I had done everything as it should be.
1. Server program with a remote data module
2. Remote data module contains a TOracleSession / TOracleDataSet / TOracleProvider
3. The client application connects to the server layer program using a TDComConnection
4. I have a TClientDataSet with its remote server set as the dcom connection, and the provider name as the name of the TOracleProvider on the server side.
5. On running the client application, I connect to the server program, open the client dataset ( thus opening the TOracleDataSet, running the query, passing the data back to the clientdataset ).
6. Save the client dataset to a file on disk
7. Separately, load / open the disk file and make a change and save back to disk.
8. Once online again, open the clientdataset to the server, load the disk file, call the applyUpdates. ERROR RECEIVED

What's wrong with this setup ? Am I using the wrong components ? Is this even supported with DOA ?

Thanks
 
I see. On Delphi 4 this is indeed not supported. It requires Delphi 5 and TDataSetProvider.ResolveToDataSet=False.
 
Back
Top