Record locked problems with M$Jet4 provider...

Dee Holtsclaw <[email protected]> Fri, 16 Aug 2002 17:50:33 -0400
Newsgroups gmane.comp.windows.devel.oledb.devel
Message-ID <[email protected]>
I've an odd problem with updating a rowset: There's a table containing
various timestamps and instance counters, call it "Foo."

I fire a UI thread (#1) with a dialog, open a rowset on "Foo" retrieving 3
elements from it and then setting another. This succeeds.

Thread #2 is started and #1 waits on it with MsgWaitForMultipleObjects. It
also opens the same rowset, retrieves the elements and sets another. Then it
also opens another rowset on "Foo" retriving and setting a different column.
This also succeeds.

Now thread #3 is started and it performs the same steps as thread #2 (with
#2 waiting on it) but the last step fails with E_FAIL, SQLErrorInfo 3218
"Could not update; currently locked."

I've verified that all of the row handles are being released in each step
and that all of the interfaces related to "Foo" are too. The connection
properties enable Alcatraz row-level locking and I request same on the
command properties. The session interface used to construct these rowsets
never has an explict transaction started.

So, does anyone have ANY idea why Jet would keep the blasted thing locked?
For that matter, is there any way for me to determine what Jet thinks is
locked or otherwise occupied?

Thanks for allowing me to torture your brain...

Dee
(Lawrence D. Holtsclaw)

You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.