Error in Managed .NET Sybase Provider
Getting this error with your Sybase .NET driver? There is limited discussion that I found via Google, so I thought I would mention the solution here:
++++++++++++++++++++++++++++++++
ERROR Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at at Sybase.Data.AseClient.Unmanaged.ExecuteCommand(IntPtr pCommandHandle)
at Sybase.Data.AseClient.AseCommand.Execute()
at Sybase.Data.AseClient.AseCommand._ExecuteReader(CommandBehavior commandBehavior)
at Sybase.Data.AseClient.AseCommand.System.Data.IDbCommand.ExecuteReader()
++++++++++++++++++++++++++++++++
To fix this, contact Sybase and get the latest managed driver from August 2008:
Sybase.AdoNet2.AseClient.dll and Sybase.AdoNet.AseClient.dll
Version: 1.15.325.0
Released 15th August 2008
The difference between the 2 DLL’s is that one is for .Net 1.0 and the other for .NET 2.0.
This is apparently from the Sybase SDK, and Sorry, I can not provide this to you at all. Please contact Sybase!
April 14, 2009 at 7:33 am
did you met the issue once again?
April 14, 2009 at 8:10 am
The newer driver would still sometimes throw an error, but certainly far less than before.
April 15, 2009 at 7:00 am
I met the issue too, When I contacted Sybase, They told me to provide source code ,can you provide test source code?
April 15, 2009 at 7:05 am
syabse has create a case to resolve this issue. if possible contact me with wurangbo@hotmail.com.
April 15, 2009 at 9:17 am
Hi,
I encountered this on a customer system, and as such I unfortunately cannot supply any source code.
However it can be replicated by reading millions of records through the DataReader under multiple processes against Sybase ASE 11.
(The equivalent operation against SQL Server 2005 SP2 was fine using its ADO.NET driver)
April 15, 2009 at 9:54 am
However it can be replicated by reading millions of records through the DataReader under multiple processes against Sybase ASE 11?
you can replicated the issue everytime?
April 16, 2009 at 3:23 am
could you please to provide a test program to replicated the issue?
April 16, 2009 at 3:45 am
Yes, the issue happened every time. (The frequency was less with the newer driver)
I no longer have access to the environment, so I can not provide a test program anymore.
In addition, I am not able to provide and source because of IP issues and client confidentiality.
Another solution for you would be to use the ODBC diver instead, which is slower but does not throw exceptions.
April 16, 2009 at 3:50 am
you mean I can replicate the issue under multiple processes?
I will try,thx!