鹰
鹰之子
Unregistered / Unconfirmed
GUEST, unregistred user!
程序为MIDAS,中间层使用Ado,客户端用SocketConnection连接.
我在客户端想进行选取或更新操作,但是却都报告:
'qry_Oper:Cannot perform this operation on an open dataset'
(qry_Oper为我在中间层使用的AdoQuery控件名称。)
操作失败!不知是何原因?谢谢指教!
with ClientDataSetdo
//选取
begin
Close;
CommandText:='select * from User');
Open;
end;
OR
with ClientDataSetdo
// 更新
begin
Close;
CommandText:='Update User set Password='''+edt_Password.Text
+''', Ime='''+cb_Ime.Text+''' where AutoID='+IntToStr(gs_UserInfo.UserID);
Execute;
end;
我在客户端想进行选取或更新操作,但是却都报告:
'qry_Oper:Cannot perform this operation on an open dataset'
(qry_Oper为我在中间层使用的AdoQuery控件名称。)
操作失败!不知是何原因?谢谢指教!
with ClientDataSetdo
//选取
begin
Close;
CommandText:='select * from User');
Open;
end;
OR
with ClientDataSetdo
// 更新
begin
Close;
CommandText:='Update User set Password='''+edt_Password.Text
+''', Ime='''+cb_Ime.Text+''' where AutoID='+IntToStr(gs_UserInfo.UserID);
Execute;
end;