L
liuaono1
Unregistered / Unconfirmed
GUEST, unregistred user!
我的天呀,用Query 操作的SQL 语法正确, 却怎么也通不过,我已
使出浑身解数还是提示出错——"Invalid parameter."
哪位好心且资深的大仙, Save me !!!
(表结构及源码如下
ruku2.db
-----------------------
字段名 类型 Size
Bianma A 17
Huoping A 20
Yazhi A 10
-----------------------
cltj_li.db
-----------------------
Bianma A 17
Huoping A 20
-----------------------
store.db
-----------------------
Mingcheng A 10
Lx A 2
-----------------------
with Query1 do
begin
SQL.clear;
SQL.Add('insert into cltj_li(Bianma,Huoping)');
SQL.Add('select distinct Bianma Huoping from ruku2');
SQL.Add('where Yazhi in( ');
SQL.Add('select Mingcheng');
SQL.Add('from store');
SQL.Add('where (Lx=:ll) and (Mingcheng<>:mm) ) ');
params[0].AsString:='YZ';
params[1].AsString:='油压班';
ExecSQL;
close;
end;
使出浑身解数还是提示出错——"Invalid parameter."
哪位好心且资深的大仙, Save me !!!
(表结构及源码如下
ruku2.db
-----------------------
字段名 类型 Size
Bianma A 17
Huoping A 20
Yazhi A 10
-----------------------
cltj_li.db
-----------------------
Bianma A 17
Huoping A 20
-----------------------
store.db
-----------------------
Mingcheng A 10
Lx A 2
-----------------------
with Query1 do
begin
SQL.clear;
SQL.Add('insert into cltj_li(Bianma,Huoping)');
SQL.Add('select distinct Bianma Huoping from ruku2');
SQL.Add('where Yazhi in( ');
SQL.Add('select Mingcheng');
SQL.Add('from store');
SQL.Add('where (Lx=:ll) and (Mingcheng<>:mm) ) ');
params[0].AsString:='YZ';
params[1].AsString:='油压班';
ExecSQL;
close;
end;