三层查询问题??clientdataset1??(80分)

  • 主题发起人 jarrm516
  • 开始时间
J

jarrm516

Unregistered / Unconfirmed
GUEST, unregistred user!
TDataSetProvider的Options属性中有一项为ptAllowCommandText,如果设为TRUE,
设置tadodataset.commandtext := 'select * from table2';
----------------------------
clientdataset1.close;
clientdataset1.commandtext:='select * from table2 wher ........';
clientdataset1.open;
在客户端程序执行如上,为什么打开的数据就是整个表的,而查询的那部份没执行??
也就是为什么执行的是tadodataset.commandtext;
 
服务端的commandtext不要设置。
应用服务端的DataSetProvider的Options项下的poAllowCommandText属性置为true,
是为了能在客户端动态下达SQL指令。
 
服务器端commandtext将会出错“commandtext propeter"
commandtext:='select * from table2 wher ........';设计时打开,不会报错.
 
ClientDataSet1.Close;
ClientDataSet1.CommandText:='select ...' ;
CdsStockIn.Execute;
 
多人接受答案了。
 
顶部