Microsoft KB Archive/270112

{|
 * width="100%"|

PRB: ADO Dynamic Properties &quot;Preserve On Commit&quot; and &quot;Preserve On Abort&quot; Not Supported

 * }

Q270112

-

The information in this article applies to:


 * Microsoft OLE DB Provider for SQL Server, versions 7.0, 7.01
 * ActiveX Data Objects (ADO), version 2.6
 * Microsoft Data Access Components version 2.6

-

SYMPTOMS
With Microsoft Data Access Components (MDAC) 2.6 or later, trying to set the Preserve On Commit or Preserve On Abort Recordset properties with the Microsoft OLE DB Provider for SQL Server (SQLOLEDB) and ADO server-side cursors causes the following error:

Run-time error '-2147217887': The requested properties cannot be supported.

With MDAC 2.5 components, setting either the Preserve On Commit or Preserve On Abort dynamic properties to True, no errors are generated.

CAUSE
SQL Server 7.0 and later does not support the setting of these properties with any server-side cursor type except static cursors. The versions of the provider that were included with MDAC prior to MDAC 2.6 would not generate an error, but you would not see the expected behavior for a recordset that had these properties set.

Steps to Reproduce Behavior

 * 1) Create a Standard EXE project using Microsoft Visual Basic 6.0, and add a Project Reference to the Microsoft ActiveX Data Objects 2.6 Library.
 * 2) Add a CommandButton to the main Form.
 * 3) Double-click the Command button. Paste the following code in the Command1_Click event handler:
 * 4) Save the project and run it. The error should be displayed.
 * 5) Run the same code against MDAC 2.5, and no errors should occur.

Additional query words:

Keywords : kbADO kbMDAC kbOLEDB kbSQLServ kbGrpDSVCDB kbGrpDSMDAC kbMDAC260 kbADO260

Issue type : kbprb

Technology : kbSQLServSearch kbAudDeveloper kbADOsearch kbADO260 kbOLEDBSearch kbMDACSearch kbMDAC260 kbOLEDBProvSQLServ701 kbOLEDBProvSQLServ700