//重新打开一个数据集之前需先Close: with ADODataSet1 do begin Close; CommandText := sSomeSQL; Open; end;
看看出错的代码吧 比如EDIT这个方法在已经打开的数据集中使用就会出错的
with DataModule1.ClientDataSetChuzhang do begin close; DataModule1.ClientDataSetChuzhang.CommandText:='sql语句' open; 编译可以过 执行的时候报错 Cannot Perform this Operction on an open dateset服务器端是ADOQuery 它的SQL语句中设计到多表查询 他的SQL语句 select customer.customerName,pay.* from customer,pay where customer.nettel=pay.nettel
with ADODataSet1 do
begin
Close;
CommandText := sSomeSQL;
Open;
end;
begin
close;
DataModule1.ClientDataSetChuzhang.CommandText:='sql语句'
open;
编译可以过 执行的时候报错 Cannot Perform this Operction on an open dateset服务器端是ADOQuery 它的SQL语句中设计到多表查询 他的SQL语句
select customer.customerName,pay.*
from customer,pay
where customer.nettel=pay.nettel