发信人: fstao()
整理人: (2000-12-05 18:41:36), 站内信件
|
【 在 redbox (小阳) 的大作中提到: 】
: 我现在正在做一个三层客户/服务器应用。数据库是oracle for sco unix,
: 我在应用服务器程序中加入的是一个query它的SQL为:select * from wxconten
: t where
: w_id=:wxid 也就是要通过客户端输入参数进行查询,并将结果返回客户端。没
: .......
比如要把Table1字段Name的A修改为B时,先在AppServer服务器里打开*_tlb.pas ,
修改参数,使其改为:procedure Update(const SQLStr: WideString); safeca ll;
procedure TRemoData.Update(const SQLStr: WideString);
begin
Query1.SQL.Text := SQLStr;
//Data := Query1.Provider.Data;
Query1.execsql;
end;
在前端:
procedure TForm1.Button1Click(Sender: TObject);
var
ab:String;
begin
// ab:='select * from table1';
ab:='update table1 set name='B'';
if not ClientdataSet1.reser1.Connected then
Clientdataset1.reser1.Connected := True;
Clientdataset1.reser1.AppServer.Update(ab);
end;
还有更新数据是用Applyupdates(-1),而不是Applyupdates(0);
-- ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: 202.96.190.124]
|
|