Master/Detail relationship cannot open detail table

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
blazarz
Posts: 8
Joined: Tue 09 Dec 2014 16:11

Master/Detail relationship cannot open detail table

Post by blazarz » Wed 20 May 2015 22:04

I have an application that was originally written with the standard TTable components and ODBC datasources. I switched to UniDAC and the application is now unable to open the detail table for one of the master/detail relationships. When the application attempts to open the detail table, it stops responding and eventually comes back with an 'Out of Memory' error. The detail table has over 1,000,000 records, and the master fields correspond to an index that's built over it. There is a 1 to 1 relationship between the master and the detail, so there's no reason it should be reading more records than it needs. I've never had this problem with the regular TTable components, but with UniDAC, it seems like the application is now trying to load all million+ records. I set the SpecificOptions.Values['FetchAll'] to 'False' which has resolved some earlier issues. For this instance, I'm dynamically creating the detail table since the table name is unknown until run time. I have a couple other Master/Detail relationships that work just fine, those tables may have a couple hundred thousand records. These components were created at design time.

I'm using Delphi 7, UniDAC version 6.1.3

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Master/Detail relationship cannot open detail table

Post by azyk » Fri 22 May 2015 10:11

Please specify whether the issue is reproduced on the UniDacDemo project when opening your tables in master-detail relationship. This demo project is located in the "Demos\UniDacDemo\" folder relatively to the UniDAC demo projects installation path. For example, the full path to the demo folder may be like the following: "C:\Users\Public\Documents\Devart\UniDAC for Delphi 7\Demos\UniDacDemo\" .

blazarz
Posts: 8
Joined: Tue 09 Dec 2014 16:11

Re: Master/Detail relationship cannot open detail table

Post by blazarz » Tue 26 May 2015 15:52

Class TUniDump not found. I have the standard version of UniDAC. TUniLoader is also not found.

blazarz
Posts: 8
Joined: Tue 09 Dec 2014 16:11

Re: Master/Detail relationship cannot open detail table

Post by blazarz » Tue 26 May 2015 16:27

Ok, the demo seems to work fine using the TUniQuery components. Can you think of any reason why the TUniTable components should work different than TUniQuery? I'm trying to figure out if there's a problem with my code, or if I should replace the tables with queries. It worked fine before moving to UniDAC. I'm just reluctant to replace component types if there's a simpler solution.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Master/Detail relationship cannot open detail table

Post by azyk » Wed 27 May 2015 09:39

We tried to reproduce the 'Out of Memory' error in master-detail datasets of TUniTable according to your recommendations. However, the issue wasn't reproduced. Please compose a small test sample reproducing the issue and send it to andreyz*devart*com .

Post Reply