procedure TForm1.Button2Click(Sender: TObject);
var
str:string;
begin
str:=dbcombobox1.Text;
with adoquery1 do
begin
connection:=adoconnection1;
close; SQL.Add('select * from rtu');
sql.Add('where rtu_id=str');
execsql; //出错的地方 提示STR参数没有默认值
open;
end;
var
str:string;
begin
str:=dbcombobox1.Text;
with adoquery1 do
begin
connection:=adoconnection1;
close; SQL.Add('select * from rtu');
sql.Add('where rtu_id=str');
execsql; //出错的地方 提示STR参数没有默认值
open;
end;
解决方案 »
- 急急急,关于获取别的进程的EProcess
- 关于Format函数使用的问题????? 挥泪大送分
- delphi高手们请进,小弟有个问题困惑了好久
- 我用了EhLib中的DBGridEh控件的多选行的功能,但是为什么多选列中的CheckBox框总是处于不可选择状态,如何解决?
- DBDateTimeEditEH1.Value的问题?
- 请教一个这个功能用什么控件可以实现的!多谢了
- 送分贴:两个unit变量如何相互引用?
- 急急急!!如何动态更改DBChart中X,Y坐标轴的内容
- 我能用create database创建一个Access数据库吗?
- 有在Win2000下得到Bios序列号的代码否?不要Dll!
- 当上了版主,散分!
- 如何通过按钮实现WINDOWS窗口的最大,恢复普通,最小化窗口按钮功能,内详!
var
str:string;
begin
str:=dbcombobox1.Text;
with adoquery1 do
begin
connection:=adoconnection1;
close; SQL.Add('select * from rtu');
sql.Add('where rtu_id='+quotedstr(str));
// execsql; //出错的地方 提示STR参数没有默认值
//上面的这行可以不用吧!!!因为下面有Open了。 open;
end;
open;
这两条语句冲突。
var
str:string;
begin
str:=dbcombobox1.Text;
with adoquery1 do
begin
close;
connection:=adoconnection1; //这里也要调整一下
SQL.Add('select * from rtu');
sql.Add('where rtu_id=str');
//去掉 execsql;(execsql不返回数据集,active:=True;或open返回数据集)
open;
end;
var
str:string;
begin
str:=dbcombobox1.Text;
with adoquery1 do
begin
close;
connection:=adoconnection1;
SQL.Add('select * from rtu ');//注意最后有个空格
sql.Add('where rtu_id='+quotestr(str));
open;
end;