【发布时间】:2009-09-12 07:59:59
【问题描述】:
在刚刚从数据库中检索数据后处理 OdbcDataReader 时,我遇到了这个异常。阅读器实际上是在离开 Using 块时被处置的。据我所知,这不应该导致任何错误。有什么想法吗?
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Data.Common.UnsafeNativeMethods.SQLFreeStmt(OdbcStatementHandle StatementHandle, STMT Option)
at System.Data.Odbc.CMDWrapper.FreeStatementHandle(STMT stmt)
at System.Data.Odbc.OdbcDataReader.Close(Boolean disposing)
at System.Data.Odbc.OdbcDataReader.Dispose(Boolean disposing)
at System.Data.Common.DbDataReader.Dispose()
at MyNamespace.MyClass.MyFunction() in C:\myfile.vb:line 100
谢谢!
编辑:使用 Sybase ASE 12.5 数据库
【问题讨论】:
-
你的问题解决了吗?
-
它随机发生了几次,然后就停止了,我没有改变任何东西......对我来说似乎完全随机。
标签: .net access-violation