Row handles must be released error

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 101
Joined: Tue 01 May 2007 16:36

Row handles must be released error

Post by ccmcbride » Thu 19 Jun 2008 19:27

I've got pretty familiar with this error. In fact, I have 8 connections to work around this error. But this time I'm stumped.
using Delphi 7, sDac,
Microsoft SQL Server: 09.00.3054
Microsoft SQL Native Client: 9.00.3042.00

all of the connections have multiple active result sets = true.

I have one table on one connection, with no other active datasets on that connection.

The table has 7 fields, 261 records, no filtersql statement. It is not attached to any controls.

I can only get this table to open without error about 1/2 the time. The rest of the time, I get the
Row handles must all be released before new ones can be obtained.

This one has me stumped. I cleared it up by putting a 'dummy' filtersql statement (which results in 0 records), then opening the table, then setting the filtersql = ''.
any ideas?

Posts: 101
Joined: Tue 01 May 2007 16:36

Post by ccmcbride » Thu 19 Jun 2008 22:03

I have tracked it down to this line (after removing the dummy filtersql statement):
// aTable.Options.StrictUpdate := false;

I uncomment, I get the error.
I comment, I don't get the error.

I am not calling refresh record, I do not have triggers, and no data updates are taking place. I am opening a table.
I am setting it to FALSE.
Why would I be getting the error?

from the help file :
TCustomDADataSet raises exception when the number of updated or deleted records is not equal 1. Setting this option also causes an exception if RefreshRecord procedure returns more than one record. The exception does not occur when you use non-SQL block.
Note: There can be problems if this option is set to True and triggers for UPDATE, DELETE, REFRESH commands that are defined for the table. So it is recommended to disable (set to False) this option with triggers.

Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 20 Jun 2008 11:52

I could not reproduce the problem neither with the last version of SDAC not with the one you are using.
Please send me a complete small sample at sdac*crlab*com to demonstrate it, including script to create and fill table.

Post Reply