Problem with Master Detail Tables

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
skabouri
Posts: 2
Joined: Tue 26 Jun 2007 12:15

Problem with Master Detail Tables

Post by skabouri » Tue 26 Jun 2007 12:23

Delphi 7.
SDAC 3.70.0.24

I use a TMSTable as a master lets call it table A, a TMSTable as a detail lets call it table B, but I also have another TMSTable unlinked that points to the same DB table as table B. Now the unlinked TMSTable works fine, but the detail table shows the detail records as entries, but without any actual data in them. Ie the grid shows 2 rows of empty data. I use the CRDBGrid that came with the SDAC version stated above.

Please advise. I have used this technique in the past a number of times but now it seems to bug. Also it seems like some sort of "reset" to the engine must be made in order for it to work properly. I dont know if this makes sense but i would love to hear from you. Please dont ask me to replicate the problem, as it wont happen on an empty datamodule with just 3 components on it. If however it is something you have come across, please help

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 26 Jun 2007 15:56

Try to remove/recreate fields in the grid attached to the detailed dataset.

skabouri
Posts: 2
Joined: Tue 26 Jun 2007 12:15

Post by skabouri » Tue 26 Jun 2007 17:56

Ok I tried what you said to no avail, and after a lot of head-banging I had an idea, to change the grid to the regular one (VCL) and voila!! It works. So my guess is there is either a bug with CRDBGrid, or some setting has to be altered for some reason? Please advise

Edit: Ok seems that was not so accurate after all. Seems that the grid is not bugged, because changing back to it everything works fine again. It is a bit odd though. I cant understand why this happened in the first place.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 27 Jun 2007 07:54

The information you have provided is not enough to determine the reason of this behaviour. I have no idea except incorrectly created columns in the grid at design time. When you reproduce this problem with CRDBGrid again, you can send me at evgeniyd*crlab*com a complete small sample to demonstrate it, including script to create and fill table.

Post Reply