SAP Knowledge Base Article - Preview

2242066 - ASE OLEDB fails with System.AccessViolationException - SDK for SAP ASE

Symptom

ASE OLE DB Provider crashes with a repeated call to schema:

unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at System.Data.Common.UnsafeNativeMethods.IRowset.GetNextRows(IntPtr hChapter, IntPtr lRowsOffset, IntPtr cRows, IntPtr& pcRowsObtained, IntPtr& pprghRows)
   at System.Data.OleDb.OleDbDataReader.GetRowHandles()
   at System.Data.OleDb.OleDbDataReader.ReadRowset()
   at System.Data.OleDb.OleDbDataReader.DumpToSchemaTable(IRowset rowset)
   at System.Data.OleDb.OleDbDataReader.BuildSchemaTableRowset(Object handle)
   at System.Data.OleDb.OleDbDataReader.GenerateSchemaTable(OleDbDataReader dataReader, Object handle, CommandBehavior behavior)
   at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
   at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.OleDb.OleDbCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.Common.DbCommandBuilder.GetSchemaTable(DbCommand sourceCommand)
   at System.Data.Common.DbCommandBuilder.BuildCache(Boolean closeConnection, DataRow dataRow, Boolean useColumnsForParameterNames)
   at System.Data.Common.DbCommandBuilder.GetInsertCommand(DataRow dataRow, Boolean useColumnsForParameterNames)
   at System.Data.OleDb.OleDbCommandBuilder.GetInsertCommand()
   at RepeatFillSchema.RepeatFillSchema.Main(String[] args) in E:\mydir\mycase\RepeatFillSchema5ToSybase\RepeatFillSchema.cs:line 39


Read more...

Environment

  • Adaptive Server Enterprise OLE DB Provider by Sybase 15.7 SP122 and higher
  • SAP Adaptive Server Enterprise (ASE) 15.5 and 15.7
  • Microsoft Visual Studio 2010

Product

SAP Adaptive Server Enterprise 15.7 ; SAP Adaptive Server Enterprise SDK 16.0 ; Sybase Adaptive Server Enterprise 15.5 ; Sybase SDK 15.7 ; Sybase Software Developer Kit 15.7

Keywords

driver, CR792199, CR#792199, 792199, access, violation, sybdrvoledb, sybdrvoledb.dll , KBA , BC-SYB-SDK , SDK , Bug Filed

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.