DOA M/D and MIDAS

ldsandon

Member³
I have one master and four details OracleDatasets in a remote datamodule. Each fills the primary key using a sequence set in SequenceField, and the detail datasets have their Master, MasterFields and DetailFields properly set.

One dataset provider exports the master and the details datasets (as nested datasets). Resolve to dataset is set to true (to have PKs and FKs processed by the OracleDataset).

When I apply changes (always only inserts), the detail records do not have their FK field filled when written to the database (the value is NULL). Everything works if I get rid of the provider.

Is this a TDatasetProvider limitation, or is a TOracleDataset limitation?

Should I set ResolveToDataset to False and process the apply myself?

Using DOA 3.4.6.4., Delphi 6 (all UPs)
 
Are the primary key values of the TOracleDataSets null, of the TClientDataSets, or both?

------------------
Marco Kalter
Allround Automations
 
I do not set neither the PKs nor the FKs, both in the client datasets and the OracleDatasets, so before the apply process they are all NULL.

Then the PKs are generated correctly when apply is called, but the FKs in the detail records are not set to the corresponding generated PKs in the master records. Because a mistake was made when the database was designed, FK fields are not NOT NULL and the records are inserted, but with a NULL FK.

Eventually what I wish to do is to write into the database an XML file which I receive from another process, I have to extract the proper information and write them to the DB (maybe using a TXMLTransformClient). In the XML file there are no suitable keys so I have to generate them myself. I was trying to have OracleDatasets to do all this stuff for me...
 
I wrote my code in the BeforeUpdateRecord of the dataset provider and OracleDatasets work correctly. I guess it is something in the TDataset provider that does not send data correctly to the OracleDatasest, but I have no time now to debug Borland's librariries...

------------------
LDS
 
Back
Top