procedure TTSGL_Form.ComboBox1Change(Sender: TObject);
begin
try
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select * from tsb where (code='''+comboBox1.Text+''')');
open;
edit;
post;
end;
except
messagedlg('数据操作出错',mtError,[mbok],0);
end;
end;
procedure TTSGL_Form.ComboBox1Change(Sender: TObject);
begin
try
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select * from tsb where (code='''+comboBox1.Text+''')');
open;
edit;
post;
end;
except
messagedlg('数据操作出错',mtError,[mbok],0);
end;
end;我在DBEDIT数据敏感控件内修改,procedure TTSGL_Form.ComboBox1Change(Sender: TObject);
begin
try
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select * from tsb where (code='''+comboBox1.Text+''')');
open;
edit;
post;
end;
except
messagedlg('数据操作出错',mtError,[mbok],0);
end;
end;
procedure TTSGL_Form.ComboBox1Change(Sender: TObject);
begin
try
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select * from tsb where (code='''+comboBox1.Text+''')');
open;
edit;
post;
end;
except
messagedlg('数据操作出错',mtError,[mbok],0);
end;
end;
我使用DBEDIT控件修改,为何不通实现,点解??
begin
try
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select * from tsb where (code='''+comboBox1.Text+''')');
open;
edit;
post;
end;
except
messagedlg('数据操作出错',mtError,[mbok],0);
end;
end;
procedure TTSGL_Form.ComboBox1Change(Sender: TObject);
begin
try
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select * from tsb where (code='''+comboBox1.Text+''')');
open;
edit;
post;
end;
except
messagedlg('数据操作出错',mtError,[mbok],0);
end;
end;我在DBEDIT数据敏感控件内修改,procedure TTSGL_Form.ComboBox1Change(Sender: TObject);
begin
try
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select * from tsb where (code='''+comboBox1.Text+''')');
open;
edit;
post;
end;
except
messagedlg('数据操作出错',mtError,[mbok],0);
end;
end;
procedure TTSGL_Form.ComboBox1Change(Sender: TObject);
begin
try
with ADOQuery1 do
begin
close;
SQL.Clear;
SQL.Add('select * from tsb where (code='''+comboBox1.Text+''')');
open;
edit;
post;
end;
except
messagedlg('数据操作出错',mtError,[mbok],0);
end;
end;
我使用DBEDIT控件修改,为何不通实现,点解??
这里错了吧 写''''+comboBox1.Text+'''' 更好一点
post;改用
ExecSQL;
UpdateRecord;试试看!