請教有關於Nested Dataset,DatasetField的問題!

andykwok 2002-06-28 02:43:56
我正在調試用Soap建立Master/Detail應用程序!
1.C/S
在C/S ,ADO 中有這樣的一個做法是在子表中加入參數,然後把DataSource設為主表。這樣的效率比較好,符合小批量多次存取的原則。
2.SOAP
在SOAP DataModel中就算那立了這種關系,都是用兩個DataProvider來提供XML到客戶端,結果是把所有數據都傳到客戶端了,這對於效率來說是不可以接受的。
3.發現
在DELPHI Help文檔中查到所謂的Nested DataSet,並發現Ado所有數據集中都有一個DataSetField的屬性。
4.請求
對於Nested Dataset方面的應用,本人還沒有接觸過,能指點小弟一二嗎?
...全文
49 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
riddler 2002-06-29
  • 打赏
  • 举报
回复
我关注
andykwok 2002-06-29
  • 打赏
  • 举报
回复
謝謝!
高手們,是你們出招的時候了!^&^
cxx1997 2002-06-28
  • 打赏
  • 举报
回复
andykwok()
我真的不会,帮你提前吧
andykwok 2002-06-28
  • 打赏
  • 举报
回复
BORLAND的幫助文件也說得太簡單了,看了也不知道怎麼做,哎,各位高手,請幫我一下吧!
謝謝!
andykwok 2002-06-28
  • 打赏
  • 举报
回复
請參見:Delphi幫助文件中的master/detail relationships, multi-tiered applications。
其內容如容如下!
You can create master/detail relationships between client datasets in your client application in the same way you set them up using any table-type dataset. For more information about setting up master/detail relationships in this way, see
Creating master/detail relationships.
However, this approach has two major drawbacks:

The detail table must fetch and store all of its records from the application server even though it only uses one detail set at a time. (This problem can be mitigated by using parameters. For more information, see Limiting records with parameters.)
It is very difficult to apply updates, because client datasets apply updates at the dataset level and master/detail updates span multiple datasets. Even in a two-tiered environment, where you can use the database connection component to apply updates for multiple tables in a single transaction, applying updates in master/detail forms is tricky.

In multi-tiered applications, you can avoid these problems by using nested tables to represent the master/detail relationship. To do this when providing from datasets, set up a master/detail relationship between the datasets on the application server. Then set the DataSet property of your provider component to the master table. To use nested tables to represent master/detail relationships when providing from XML documents, use a transformation file that defines the nested detail sets.

When clients call the GetRecords method of the provider, it automatically includes the detail dataset as a DataSet field in the records of the data packet. When clients call the ApplyUpdates method of the provider, it automatically handles applying updates in the proper order.
andykwok 2002-06-28
  • 打赏
  • 举报
回复
如果有SOAP WEBSERVIC 主從結構的例子就好了!^&^
cxx1997 2002-06-28
  • 打赏
  • 举报
回复
NO 1

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧