Master Detail with CachedUpdate
Hello,
The Disconnected mode is recommended to minimize data loss for networks with unstable/bad connection, where there are a lot of disconnections. In this mode, the connection is set only when data needs to be sent/received between a server and a client, therefore some performance loss is possible, as to perform each operation, a new connection is needed.
The Disconnected mode is recommended to minimize data loss for networks with unstable/bad connection, where there are a lot of disconnections. In this mode, the connection is set only when data needs to be sent/received between a server and a client, therefore some performance loss is possible, as to perform each operation, a new connection is needed.
hello,
If you work with a stable connection, you don't need to use the Disconnected mode. The main specificity of the Disconnected mode is that you don't need to open connection explicitly, i.e. you don't need to call the PgConnection.Connect method, the connection will be set on demand. If you connect to the server explicitly in the disconnect mode, than it will work in the usual mode without automatic server connection/disconnection.
If you work with a stable connection, you don't need to use the Disconnected mode. The main specificity of the Disconnected mode is that you don't need to open connection explicitly, i.e. you don't need to call the PgConnection.Connect method, the connection will be set on demand. If you connect to the server explicitly in the disconnect mode, than it will work in the usual mode without automatic server connection/disconnection.
Re: Master Detail with CachedUpdate
hello,
its me again...now, i've another table schema which similar to previous.
just the serial id field changed to varchar(50) and name now is not null. i found that master table must be posted before detail table insert record, is that true ? how to avoid that ?
following my settings:
tblMaster.SQL.Text := 'SELECT * FROM master';
tblMaster.CachedUpdates := True;
tblMaster.Options.DefaultValues := True;
tblMaster.Options.LocalMasterDetail := True;
tblDetails.SQL.Text := 'SELECT * FROM detail';
tblDetails.CachedUpdates := True;
tblDetails.Options.DefaultValues := True;
tblMaster.Options.LocalMasterDetail := True;
since name field now is not null, the users may insert detail record before fill the name field (since i can't control the users behavior), so any solution about this ? very urgent, please help.
its me again...now, i've another table schema which similar to previous.
Code: Select all
master table (
id varchar(50) primary key,
name varchar(50) NOT NULL,
);
detail table (
id serial primary key,
master_id varchar(50) NOT NULL,
name varchar(50) NOT NULL
);
following my settings:
tblMaster.SQL.Text := 'SELECT * FROM master';
tblMaster.CachedUpdates := True;
tblMaster.Options.DefaultValues := True;
tblMaster.Options.LocalMasterDetail := True;
tblDetails.SQL.Text := 'SELECT * FROM detail';
tblDetails.CachedUpdates := True;
tblDetails.Options.DefaultValues := True;
tblMaster.Options.LocalMasterDetail := True;
since name field now is not null, the users may insert detail record before fill the name field (since i can't control the users behavior), so any solution about this ? very urgent, please help.
Re: Master Detail with CachedUpdate
Hello,
For MasterDataSet it is necessary to use the smInsert mode, for DetailDataSet - any of modes, but to decrease server calls number and avoid counter increasing, it is better to use the smPost mode.
For MasterDataSet it is necessary to use the smInsert mode, for DetailDataSet - any of modes, but to decrease server calls number and avoid counter increasing, it is better to use the smPost mode.
Re: Master Detail with CachedUpdate
already use smInsert for MasterDataSet, but if i haven't Post the MasterDataSet before insert DetailDataSet record, after i Post the MasterDataSet, all DetailDataSet has gone (disappear).
and this only appear when the table was empty (no record), bugs?
and this only appear when the table was empty (no record), bugs?
Re: Master Detail with CachedUpdate
hello,
When realizing the Master-Detail relation, with any values of the CachedUpdates and LocalMasterDetail options, the Post method should be called for a master record before the detail records correspondent to it are added. But when enabling these options, the Post method will insert data only to the local DataSet without saving them to the server.
When realizing the Master-Detail relation, with any values of the CachedUpdates and LocalMasterDetail options, the Post method should be called for a master record before the detail records correspondent to it are added. But when enabling these options, the Post method will insert data only to the local DataSet without saving them to the server.
Re: Master Detail with CachedUpdate
hi,
does the latest version have any update related to this features ?
does the latest version have any update related to this features ?
Re: Master Detail with CachedUpdate
hello,
We are still working on this problem.
We will notify you as soon as we have any results.
We are still working on this problem.
We will notify you as soon as we have any results.
Re: Master Detail with CachedUpdate
thank you for the effort. since i think it is very important for database application development on the master-detail relationship. refer to the database side, there're also has a foreign key to control cascade or restrict update/delete. and i think there're also not every application use un-changeable ID for their application, hopeful your team can fix this problem soon.