标题:实时错误'-2147217885' (80040e23)':
只看楼主
sun034
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-5-10
 问题点数:0 回复次数:2 
实时错误'-2147217885' (80040e23)':

我在执行一个删除任务时出现了"实时错误'-2147217885' (80040e23)':
行句柄引用了一个已被删除的行或被标识为删除的行" 这样一句话 不过我要删了内容已经被删了


Public Sub InitData()
Dim i As Integer

Adodc1.RecordSource = "select * from 课件表 order by 课件编号"

If Adodc1.Recordset.EOF = False Then

With MSFlexGrid1
.Rows = 3
.Row = 2

Do While Not Adodc1.Recordset.EOF
.Rows = .Rows + 1
For i = 1 To Adodc1.Recordset.Fields.Count
.TextMatrix(.Row - 1, i - 1) = Adodc1.Recordset.Fields(i - 1)
Next i
.Row = .Row + 1
Adodc1.Recordset.MoveNext
Loop
End With
End If
End Sub

搜索更多相关主题的帖子: 实时错误 Rows EOF 课件 
2006-05-10 13:50
majiaow
Rank: 1
等 级:新手上路
帖 子:172
专家分:0
注 册:2006-2-21
得分:0 
應該是數據溢出,加個on error goto語句,if err.number=-2147217885 then顯示一個提示錯誤信息應該就可以了

2006-05-10 15:45
sun034
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2006-5-10
得分:0 

ublic Sub InitData()
Dim i As Integer

Adodc1.RecordSource = "select * from 课件表 order by 课件编号"

If Adodc1.Recordset.EOF = False Then

With MSFlexGrid1
.Rows = 3
.Row = 2

Do While Not Adodc1.Recordset.EOF
.Rows = .Rows + 1
For i = 1 To Adodc1.Recordset.Fields.Count
.TextMatrix(.Row - 1, i - 1) = Adodc1.Recordset.Fields(i - 1)
Next i
.Row = .Row + 1
Adodc1.Recordset.MoveNext
Loop
End With
End If
End Sub

提示是黄色的那些代码有错啊

2006-05-10 17:58



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-63091-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.212776 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved