紧急求助,高手请进来帮忙看看。很着急。

orablue 2003-10-09 11:07:46
type
wysdata=record
wyname:string;
wymj:real;
mpmdj:real ;
yzzje:real;
glmpmdj:real ;
glzje:real ;
fz:integer ;
sb :integer ;
sblist:tstrings ;
db :integer ;
dblist:tstrings ;
mq :integer ;
mqlist :tstrings ;
dh :integer ;
dhlist :tstrings ;
end;


save:array of wysdata ;



//取出数据
procedure Thtdj.ComboBox4Change(Sender: TObject);
var i:integer ;
wy:wysdata;
tpst:tstrings ;
begin
listbox2.Clear ;listbox3.Clear ;listbox4.Clear ;listbox5.Clear ;
if combobox4.Text<>'' then
begin
speedbutton2.Enabled :=true ;
wy :=save[combobox4.ItemIndex];
edit24.Text :=inttostr(wy.sb );
edit25.Text :=inttostr(wy.db );
edit26.Text :=inttostr(wy.mq );
edit27.Text :=inttostr(wy.dh );
if wy.sblist<>nil then
begin
showmessage(inttostr(wy.sblist.Count)) ;《-----这里还是报错啊,内存错误,只要使用wy.sblist就报错。装载数据就不会有这个问题。
end;
// if wy.dblist<>nil then
// listbox3.Items.Assign(wy.dblist) ;
// if wy.mqlist<>nil then
// listbox4.Items.Assign(wy.mqlist) ;
// if wy.dhlist<>nil then
// listbox5.Items.Assign(wy.dhlist) ;
end;
end;

//装载数据
procedure Taddsb.SpeedButton6Click(Sender: TObject);
var i:integer ; wy:wysdata;
begin
with ut_htdj.htdj do
begin
wy :=save[combobox4.ItemIndex];
listbox2.Items :=addsb.listbox1.Items ;
listbox3.Items :=addsb.listbox2.Items ;
listbox4.Items :=addsb.listbox3.Items ;
listbox5.Items :=addsb.listbox4.Items ;
if wy.sblist<>nil then
begin
wy.sblist := addsb.ListBox1.Items ;
end;
if wy.dblist<>nil then
wy.dblist :=addsb.ListBox2.Items ;
if wy.dhlist<>nil then
wy.dhlist :=addsb.ListBox4.Items ;
if wy.mqlist<>nil then
wy.mqlist :=addsb.ListBox3.Items ;
save[combobox4.ItemIndex]:=wy ;
end;
if ut_data.wygl_data.jlsb.Active then ut_data.wygl_data.jlsb.Close ;
addsb.Close ;
end;


...全文
30 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
47522341 2003-10-15
  • 打赏
  • 举报
回复
怎么了?

2,496

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧