L
LIUYECAI
Unregistered / Unconfirmed
GUEST, unregistred user!
我用TADOQUERY控件来实现动态查询:可是总调试不通!真的是急死人啦!!
几句代码说明情况:
1. 2.
with adoquery1 do sqlstring:string;
begin sqlstring:='myvalue'
close; with adoquery1 do
sql.clear; begin
sql.add( 'select * from tablename'); close;
sql.add( 'where fieldname="myvalue" '); sql.clear;
perpared; sql.text:='select * from tabname where fieldname="'+sqlstring+'"';
open; perpared;
end; open;
end;
两条语句都调试通不过!!!?? 错误提示为表中没有"myvalue"列名!
高手救我!SQL语句中的常量及变量到底怎样引用? 我真的找不到错在哪了??
此题暂计分100,不过可以再加分的!!
几句代码说明情况:
1. 2.
with adoquery1 do sqlstring:string;
begin sqlstring:='myvalue'
close; with adoquery1 do
sql.clear; begin
sql.add( 'select * from tablename'); close;
sql.add( 'where fieldname="myvalue" '); sql.clear;
perpared; sql.text:='select * from tabname where fieldname="'+sqlstring+'"';
open; perpared;
end; open;
end;
两条语句都调试通不过!!!?? 错误提示为表中没有"myvalue"列名!
高手救我!SQL语句中的常量及变量到底怎样引用? 我真的找不到错在哪了??
此题暂计分100,不过可以再加分的!!