2

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: enter image description here

Community
  • 1
  • 1
iMan Biglari
  • 4,674
  • 1
  • 38
  • 83

1 Answers1

3

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.

Uwe Raabe
  • 45,288
  • 3
  • 82
  • 130