Need the ability to explicitly set DBPROP_COMMITPRESERVE

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
gezas
Posts: 18
Joined: Thu 15 Apr 2010 01:24

Need the ability to explicitly set DBPROP_COMMITPRESERVE

Post by gezas » Mon 03 May 2010 23:10

Hi,

I would like to set
DBPROP_COMMITPRESERVE and DBPROP_ABORTPRESERVE to TRUE for static cursor.

This is needed to avoid the "object is in zombie state" errors.

See details here: http://support.microsoft.com/kb/321714

I could set these properties using ADO but could not found a way to set it using SDAC.

Temporarly I added these 2 lines

AddPropBool(DBPROP_COMMITPRESERVE, True);
AddPropBool(DBPROP_ABORTPRESERVE, True);

into procedure TOLEDBRecordSet.SetCommandProp;

and now our application works fine.

Can you please expose these properties on the TMSConnection or on TMSSQ and TMSQuery?

Or it would be even better if you would let customization of command properties (maybe an event on the connection which gets called in TOLEDBRecordSet.SetCommandProp). In the event handler I could set any property before the properties are assigned to the command).

Regards

Geza

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 05 May 2010 09:08

Thank you for the information. We will add setting these properties for a static cursor in the next SDAC build.

gezas
Posts: 18
Joined: Thu 15 Apr 2010 01:24

Post by gezas » Wed 05 May 2010 22:34

Excellent. Thank you

Post Reply