データベースからデータを取得した直後に 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データベースを使用