L
lsyhql
Unregistered / Unconfirmed
GUEST, unregistred user!
小第有一问题,当执行以下程序后,对dbedit1和dbgrid的记录无法进行
修改(修改后要对修改的记录返回到相应的数据库中),请多指教!
procedure TForm1.Formcreate(Sender: TObject);
begin
datasource1.dataset:=query1;
dbgrid.datasource:=datasource1;
dbedit1.datasource:=datasource1;s0:=clientqu.text;s1:='"';
end;
procedure TForm1.addbuttonClick(Sender: TObject);
var s,s0,s1:string;
begin
s0:=client.text;s1:='"';
s:='select * from client.db where client= '+s1+s0+s1;
query1.Close;query1.sql.clear;query1.sql.add(s);query1.open;
end;
修改(修改后要对修改的记录返回到相应的数据库中),请多指教!
procedure TForm1.Formcreate(Sender: TObject);
begin
datasource1.dataset:=query1;
dbgrid.datasource:=datasource1;
dbedit1.datasource:=datasource1;s0:=clientqu.text;s1:='"';
end;
procedure TForm1.addbuttonClick(Sender: TObject);
var s,s0,s1:string;
begin
s0:=client.text;s1:='"';
s:='select * from client.db where client= '+s1+s0+s1;
query1.Close;query1.sql.clear;query1.sql.add(s);query1.open;
end;