I'm using Sybase.ASEOLEDBProvider.2 version 2.7 for all database access-using OLEDB from VC++ and use CDynamicParameterAccessor: CCommand<CDynamicParameterAccessor, CRowset, CMultipleResults> cmdRS
The problem is when the stored proc attempts to insert duplicate key.
Till version 2.5 it used to return "Command has been aborted" as error when checked using GetErrorInfo() after execution.
But with version 2.7 of the OLEDB provider, it doesn't raise any error. Even if GetErrorInfo is called to check if anything has gone wrong after executing the stored proc it returns a NULL pointer which means no errors have occurred.
But when I run the same stored proc using Visual Basic, it doesn't raise any error but the ADODB.Connection errors are populated correctly as "Attempt to insert duplicate.... and Command has been aborted"
It was reported as bug in version 2.5 of ASEOLEDBProvider and fixed in 2.7
Is anyone aware of the workaround or solution other than explicitly checking for duplicate row in every stored proc?