Page 1 of 1

Master/Detail relationship cannot open detail table

Posted: Wed 20 May 2015 22:04
by blazarz
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

Re: Master/Detail relationship cannot open detail table

Posted: Fri 22 May 2015 10:11
by azyk
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\" .

Re: Master/Detail relationship cannot open detail table

Posted: Tue 26 May 2015 15:52
by blazarz
Class TUniDump not found. I have the standard version of UniDAC. TUniLoader is also not found.

Re: Master/Detail relationship cannot open detail table

Posted: Tue 26 May 2015 16:27
by blazarz
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.

Re: Master/Detail relationship cannot open detail table

Posted: Wed 27 May 2015 09:39
by azyk
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 .