我拉了一个TQUERY
跟两个TBITBTN,分别为"修改"跟"取消"QUERY1.SQL.TEXT := 'UPDATE ABC123 SET AAA = :AAA WHERE BBB = :BBB'修改的程式码为:
if Query1.Active then
Query1.Close;Query1.ParamByName('AAA').AsString := test1.Text;
Query1.ParamByName('BBB').AsString := test2.Text;
Query1.ExecSQL;请教
在"Query1.ExecSQL;"这行出现
table does not exist
File does not exist
File: D:\ww\aa.db
File: D:\ww\aa.DBF
File: D:\ww\aa.txt
File: D:\ww\aa.
跟两个TBITBTN,分别为"修改"跟"取消"QUERY1.SQL.TEXT := 'UPDATE ABC123 SET AAA = :AAA WHERE BBB = :BBB'修改的程式码为:
if Query1.Active then
Query1.Close;Query1.ParamByName('AAA').AsString := test1.Text;
Query1.ParamByName('BBB').AsString := test2.Text;
Query1.ExecSQL;请教
在"Query1.ExecSQL;"这行出现
table does not exist
File does not exist
File: D:\ww\aa.db
File: D:\ww\aa.DBF
File: D:\ww\aa.txt
File: D:\ww\aa.
因为这支程式原先只有做insert,我想要变成update所以才会在用一个tquery可为什么加上去之后就会出现呢??
(最原先未加上,还可以用)
begin
edit;
ParamByName('AAA').AsString :=trim(test1.Text);
ParamByName('BBB').AsString :=trim(test2.Text);
UpdateRecord;
UpdateBatch;
end;
doquerys.Close;
doquerys.Open;
with do
begin
edit;
ParamByName('AAA').AsString :=trim(test1.Text);
ParamByName('BBB').AsString :=trim(test2.Text);
UpdateRecord;
UpdateBatch; end;
这样才行