how to improve speed of fetching record in Master-Detail Relationship?

how to improve speed of fetching record in Master-Detail Relationship?

Post by kmak » Fri, 15 Oct 2004 12:04:00


(FireBird 1.5, D7)

In Master-detail relationship PacketRecords property of Detail Dataset
doesn't work?
It seems to get all records of detail table when the first time of master
dataset opening out of PacketRecords value.
So It takes long time to get all records of detail table not be coditioned
by Master's key value.
(And then after opening It works rapidly scroll of Master.. it is slow at
Only the first time of opening)

I want to enable detail's PacketRecords property.
Is it impossible?
 
 
 

how to improve speed of fetching record in Master-Detail Relationship?

Post by kmak » Fri, 15 Oct 2004 16:28:07

With above question...

In my test, I got "unassigned code" error when detail dataset constitued of
TSQLQuery-DataSetProvider-ClientDataset.
We can't use TSQLQuery-DataSetProvider-ClientDataset as Detail Dataset ?
I'm very confused at this situation.

Firebird 1.5, D7

master-query : select * from member (total about 20,000 records)
detail-query : select * from order (total about 60,000 records)

master : SQLQuery1 - DataSetProvider1 - ClientDataset1 - DataSoruce1 -
Datacontrols..
detail : SQLQuery2 - DataSetProvider2 - ClientDataset2 - DataSoruce2 -
Datacontrols..

and

Set ClientDataset2's MasterSource property to 'DataSource1'
Set ClientDataset2's MasterField property to 'cust_no'
Set ClientDataset2's IndexFieldNames property to 'cust_no'
Set ClientDataset2's PacketRecords property to '0' (<- automatically changed
from -1 by Field Link Designer)
(All of them are set by Field Link Designer)

and then

set ClientDataset1's Active to True....
set ClientDataset2's Active to True.... <----- "SQL server error :
unassigned code" error occur!!..

why? and how to....?


----- Original Message -----
From: "kmaku" < XXXX@XXXXX.COM >
Newsgroups: borland.public.delphi.database.dbexpress
Sent: Thursday, October 14, 2004 12:04 PM
Subject: how to improve speed of fetching record in Master-Detail
Relationship?

 
 
 

how to improve speed of fetching record in Master-Detail Relationship?

Post by Bill Tod » Fri, 15 Oct 2004 22:12:02

Do you have Delphi 8 installed on your system?

What happens if you statically link the dbExpress driver and MidasLib
into your EXE?

--
Bill (TeamB)
TeamB cannot answer questions received via email
 
 
 

how to improve speed of fetching record in Master-Detail Relationship?

Post by kmak » Sat, 16 Oct 2004 10:50:25


No...


statically link <- I don't know what you mean. (I have short knowledge
especially about Linking..)

I have been searching about this problem. some articles said using
TSQLDataSet instead of TSQLQuery.
So I did that. and then I found some other problem.
TSQLDataSet worked well in design time but in running time. (<- occur
"unsupported operation..." error")
But I set the GetMetaData property of TSQLDataSet to False then All worked
well.

So I've done what I wanted.
But I still want to know about that problems that I before asked. According
to my searching and testing
that problem is not only mine. Is that a bug of DBExpress?

... thanks a lot...
 
 
 

how to improve speed of fetching record in Master-Detail Relationship?

Post by Bill Tod » Sat, 16 Oct 2004 11:06:38

If you mean your question about the PacketRecords property of the
nested detail dataset then you are correct that it does not work. When
you use nested datasets you are saying that you want the detail records
for each master record that you select.

--
Bill (TeamB)
TeamB cannot answer questions received via email