W
WilliamGui
Unregistered / Unconfirmed
GUEST, unregistred user!
千年古题:
BDS2006环境,TADODataSet,TDataSetProvider, TClientDataSet放在同一窗体,
设置如下:
TADODataSet有多个主从结构,
TDataSetProvider(AComponent).Options:=[poFetchDetailsOnDemand,
poCascadeDeletes, poCascadeUpdates,
poAllowMultiRecordUpdates, poAllowCommandText];
TDataSetProvider(AComponent).ResolveToDataSet:=True;
TDataSetProvider(AComponent).UpdateMode:=upWhereKeyOnly;
TClientDataSet(AComponent).FetchOnDemand:=False;
打开主表的TADODataSet,打开主表的TClientDataSet并FetchDetail,增加从表数据,Apply出错,提供TADDODataSet从表数据控制项没打开,
如在打开主表的TADODataSet之后打开主表的TClientDataSet之前,打开从表的TADODataSet,那么,打开主表的TClientDataSet之后,打开的从表的TADODataSet又不会是打开状态,为何? 大家,明白我想达到的意思吗?
如把打开从表的TADODataSet放到最后打开,一切正常,问题是无论如何,为什么会向后端多执行几条重复的SQL语句?
BDS2006环境,TADODataSet,TDataSetProvider, TClientDataSet放在同一窗体,
设置如下:
TADODataSet有多个主从结构,
TDataSetProvider(AComponent).Options:=[poFetchDetailsOnDemand,
poCascadeDeletes, poCascadeUpdates,
poAllowMultiRecordUpdates, poAllowCommandText];
TDataSetProvider(AComponent).ResolveToDataSet:=True;
TDataSetProvider(AComponent).UpdateMode:=upWhereKeyOnly;
TClientDataSet(AComponent).FetchOnDemand:=False;
打开主表的TADODataSet,打开主表的TClientDataSet并FetchDetail,增加从表数据,Apply出错,提供TADDODataSet从表数据控制项没打开,
如在打开主表的TADODataSet之后打开主表的TClientDataSet之前,打开从表的TADODataSet,那么,打开主表的TClientDataSet之后,打开的从表的TADODataSet又不会是打开状态,为何? 大家,明白我想达到的意思吗?
如把打开从表的TADODataSet放到最后打开,一切正常,问题是无论如何,为什么会向后端多执行几条重复的SQL语句?