Reputation: 4776
A duplicate of this question, but since the answer there wasn't accepted I thought maybe there's a workaround.
I have two TSQLTable
components on my datasnap
server which are in a master/detail relationship, and one TDataSetProvider
linked to the master table. On my client application, there are two TClientDataSet
components, of which one is nested in the other naturally. When I try to post a new record to the detail dataset, even before calling ApplyUpdates()
, the mentioned exception is raised. Is this really a bug in XE2? How to work around it?
Here's the diagram SSMS generated for the tables:
Upvotes: 2
Views: 1103
Reputation: 47704
I assume the master detail relation is by CenterID -> ID. This does not work as expected.
The Midas internals require to use the same field name in both datasets to establish a master detail relationship. Giving your layout it tries to establish a relation using the ID field in both tables.
To resolve this rename the ID field in Centers to CenterID.
Upvotes: 3