Subject | Re: [IBO] IBOQuery with record locking |
---|---|
Author | earnesttse |
Post date | 2008-03-20T07:10:25Z |
If turn off LockWait, in this case, I will get error: ISC ERROR
CODE:335544569; ISC ERROR MESSAGE:Dynamic SQL Error, SQL error code=-
504, Invalid cursor reference, Cursor is not open.
It seems the IBOQuery of other user knows that the record was locked.
My problem is that if one user edited a detail record of first master
record and don't commit yet, there is no other user can open the
query of detail table.
I tried to use [EMS InterBase & FireBird Manager 3] to veiw the data
which edited and posted in a transcation (before commit or rollback),
I can see the old verson of the record without error.
Thanks for help!
Earnest
--- In IBObjects@yahoogroups.com, "Jason Wharton" <supportlist@...>
wrote:
CODE:335544569; ISC ERROR MESSAGE:Dynamic SQL Error, SQL error code=-
504, Invalid cursor reference, Cursor is not open.
It seems the IBOQuery of other user knows that the record was locked.
My problem is that if one user edited a detail record of first master
record and don't commit yet, there is no other user can open the
query of detail table.
I tried to use [EMS InterBase & FireBird Manager 3] to veiw the data
which edited and posted in a transcation (before commit or rollback),
I can see the old verson of the record without error.
Thanks for help!
Earnest
--- In IBObjects@yahoogroups.com, "Jason Wharton" <supportlist@...>
wrote:
>On
>
> Turn LockWait off.
>
> This should not be used in an interactive GUI application.
>
> The transactions will isolate everything fine without LockWait.
>
> Jason Wharton
>
> > -----Original Message-----
> > From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
> > Behalf Of earnesttsecommited"
> > Sent: Wednesday, March 19, 2008 8:18 PM
> > To: IBObjects@yahoogroups.com
> > Subject: Re: [IBO] IBOQuery with record locking
> >
> >
> > Dear Helen,
> >
> > Thanks for detail explain!
> >
> > My problem is that when a detail was edited and posted in a
> > Transaction, the second user still can't to read "latest
> > version of the record. When LockWait=True, the application ofsecond
> > user will be hold to wait the transaction of first user to commitor
> > rollback; when LockWait=False, the application of second userwill
> > raise record locking error.and
> >
> > I want to allow another user can read the record which was edited
> > posted in a uncompleted transaction without waiting or error.AutoCommit=True,
> >
> > Thanks for help!
> >
> > Earnest
> >
> > --- In IBObjects@yahoogroups.com, Helen Borrie <helebor@> wrote:
> > >
> > > At 01:00 PM 20/03/2008, you wrote:
> > > >Hello, I have a record locking problem needing your help!
> > >
> > > I am using Delphi 2007, IBO 4.8.7, IBOQuery,
> > > Isolation=tiCommitted.one
> > >
> > >
> > > >I have master/detail tables to record sale invoice. I call
> > > >IB_Database.StatTransaction before editing master reocrd. When
> > > >user is editing a record of detial, other user can't read theor
> > edited
> > > >record, system will wait until the record has been cancelled
> > > >posted.doing.
> > >
> > > Transactions cannot see work that other transactions are
> > Fb/IB do not support "dirty read" so, even when the firsttransaction
> > (A) posts the work that results from an Edit, other transactionswill
> > not see those changes. If the other transactions are viewing theTransaction
> > table with ReadCommitted isolation, they will see the changes of
> > Transaction A only after Transaction A has committed. If
> > A does not commit, but rolls back instead, other transactionswill
> > NEVER see those changes.If
> > >
> > > Whilst TrxA is reading the record (XYZ), other records can read
> > the "latest committed" version of that record.
> > > --- during Editing, nothing changes on the database side
> > > --- at Post, the dataset sends a DML statement to the server.
> > no other transactions already have uncommitted changes posted forsee
> > that record, Trx A gets the lock. Other transactions can still
> > the latest committed version, as before, but none will be allowedto
> > post changes to that record.exist
> > >
> > > If TrxA actually INSERTs the record in question, it does not
> > for other transactions to see until that INSERT is committed byANY
> > TrxA. If it is true that you have other users that cannot see
> > version of record XYZ while TrxA is Editing it, then the reasonwill
> > be that TrxA itself inserted the record.
> > >
> > > >Is there any way to allow the second user to view the edited
> > record
>