社区
Delphi
帖子详情
List index outof bounds(2)怎么办?
big_welley
2002-11-13 04:05:58
出错如下:
for i:=0 to DBGrid4.FieldCount-1 do
listbox2.Items[i]:=DBGrid2.Columns[i].FieldName;
...全文
170
4
打赏
收藏
List index outof bounds(2)怎么办?
出错如下: for i:=0 to DBGrid4.FieldCount-1 do listbox2.Items[i]:=DBGrid2.Columns[i].FieldName;
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
big_welley
2002-11-13
打赏
举报
回复
哦,谢谢,我写错了。
Wnyu
2002-11-13
打赏
举报
回复
listbox2.Items[i]越界了;
付值前判断一下.
if listbox2.items.count <= i then
listbox2.items.addd(DBGrid2.Columns[i].FieldName)
else
listbox2.items[i] = DBGrid2.Columns[i].FieldName;
BobLeeCn
2002-11-13
打赏
举报
回复
同意楼上兄弟的看法。DBGrid4和DBGrid2的Datasource基本上可以确定不是同一个。
BoBoQ
2002-11-13
打赏
举报
回复
DBGrid越界了。
循环的次数是DBGrid的字段数
而循环体内的程序却使用DBGrid2的字段数,两者如果Datasource不是同一个的话,有可能引起越界
List
index
out of
bounds
(-1)错误解决办法
解决办件运行弹出
List
index
out of
bounds
错误.
常用数据库的驱动程序及JDBC URL分享
主要介绍了常用数据库的驱动程序及 JDBC URL,需要的朋友可以看下
NoteExpress:
List
index
out of
bounds
最近在使用NoteExpress时遇到错误:
List
index
out of
bounds
参考网友的讨论发现,只需要两步即可解决问题: 去除格式化 重新选择新的引文格式
出现
list
index
out of
bounds
(0)?
出现
list
index
out of
bounds
(0)? Delphi / Windows SDK/APIhttp://www.delphi2007.net/DelphiNetwork/html/delphi_200612312048352.html 运用Socket编写了一个客户端,不过只能连上和接收服务器的信息,不知道...
关于
List
index
out of
bounds
(0)的问题
关于
List
index
out of
bounds
(0)的问题 Delphi / Windows SDK/API...运行输入数据按确定按钮后,弹出对话框说
List
index
out of
bounds
(0),为什么会有这样的错误呢...
Delphi
5,388
社区成员
262,730
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章