公文处理软件:delphi 出错:list index out of bounds(0)
来源:百度文库 编辑:神马品牌网 时间:2024/05/08 00:32:05
目的是向数据库中的表添加一条记录,代码是
with adoquery3 do
begin
close;
sql.Clear ;
sql.Add('insert into szb');
sql.Add('(ʱ¼ä,ÊÕÖ§,ÊÕÖ§ÈË,½ð¶î,±¸×¢)');
sql.Add('values(:no,:money,:listcode,:apart,:record)');
parameters.Items[0].Value :=rzdatetimeedit1.Date ;
if radiobutton1.Checked then
parameters.Items[1].value:='ÊÕÈë'
else if radiobutton2.Checked then
parameters.Items[1].value:='Ö§³ö';
parameters.Items[2].Value :=rzdblookupcombobox1.Text ;
parameters.Items[3].Value :=strtofloat(rzedit1.Text );
parameters.Items[4].Value :=rzmemo1.Line ;
execsql;
end;
with adoquery3 do
begin
close;
sql.Clear ;
sql.Add('insert into szb');
sql.Add('(ʱ¼ä,ÊÕÖ§,ÊÕÖ§ÈË,½ð¶î,±¸×¢)');
sql.Add('values(:no,:money,:listcode,:apart,:record)');
parameters.Items[0].Value :=rzdatetimeedit1.Date ;
if radiobutton1.Checked then
parameters.Items[1].value:='ÊÕÈë'
else if radiobutton2.Checked then
parameters.Items[1].value:='Ö§³ö';
parameters.Items[2].Value :=rzdblookupcombobox1.Text ;
parameters.Items[3].Value :=strtofloat(rzedit1.Text );
parameters.Items[4].Value :=rzmemo1.Line ;
execsql;
end;
我一般是这样用的
self.ADOQuery1.Parameters.ParamByName('[参数的名字]').Value
这样试试。
delphi 出错:list index out of bounds(0)
list index out of bounds
list index out of bounds
VB中的list.index和list.text怎么用?
list index out of bounds是什么意思
list index out of bounds是什么意思
List index out fo bounds (0)
list index out of bouds(2)
Delphi 中 Grid 的 index
打开网站出错,出现一个对话框,内容是"list index out of bounds” 有谁知道是怎么回事啊,该怎么解决啊