2014/01/20

葡萄牙人寫的 Master / Detail for ClientDataSet 教學

雖然完全看不懂葡萄牙文,但英文的程式仍具有很大的幫助。

在 DataSetProvider.Options 設定 段落可以說是全篇的精華啊!

PASSO-A-PASSO COMO CRIAR UM RELACIONAMENTO MASTER/DETAIL USANDO CLIENTDATASET


主要設定為 True 的 Options 項目有:(說明參閱)
poCascadeDeletes: Tells the server to delete detail records automatically when master table records are deleted. To use this option, the provider must represent the master of a master/detail relationship and the database must support cascaded deletes as part of its referential integrity settings.

poCascadeUpdates: Tells the server to automatically update detail records when master table key values are changed. To use this option, the provider must represent the master of a master/detail relationship and the database must support cascaded updates as part of its referential integrity settings. 

poAutoRefresh: Refreshes the client dataset with current record values whenever it applies updates.

poPropogateChanges: Changes made in a BeforeUpdateRecord or AfterUpdateRecord event handler are sent back to the client and merged into the client dataset.

poRetainServerOrder: Signals that the client should not attempt to re-establish the default order by sorting the records in the data packet. This prevents the client from changing the record order because, for example, it is unable to duplicate the locale on the server.



沒有留言:

張貼留言