Subject | Re: [IBO] SQL Update where params |
---|---|
Author | jensdein |
Post date | 2004-07-02T13:57:46Z |
--- In IBObjects@yahoogroups.com, "constantijnw" <cw.s@x> wrote:
the database or the application.
I was doing a post and commit and now I understand that when committed
the database will not throw an exception when another update that was
read with a earlier recordversion does it's update - and will
therefore possibly do an overwrite.
It's this exact issue the clientdataset resolves by using all the
fields in the dataset and checking wether anything was updated after
it has been executed. I am aware that this is not an database
exception but an application exception but it solves the issue of
owerwriting another users committed changes.
If we all understand each other now :-) (sorry if I was not making my
self clear enough) let me try to ask again :
Does IBO have any means of solving this spesific issue - making sure
that one users committed changes is not overwritten by another users
committed changes? (something like the clientdataset solution)
> --- In IBObjects@yahoogroups.com, Helen Borrie <helebor@t...> wrote:properties on
> > At 01:03 PM 2/07/2004 +0000, you wrote:
> > >I'm sorry - I'm still a bit confused. I tried to set the
> > >the transaction as you suggested.instances
> > >
> > >Isolation = tiCommitted
> > >RecVersion = False
> > >LockWait = False
> > >
> > >
> > >I then started my app twice, found the same record in both
> > >and first did an update in the first app and save. Then i went torecord and
> > >second app instance and did another update here on the same
> > >field and when I saved I did a overwrite of my first change andgot no
> > >exceptions.the
> > >
> > >If I understand you right this should be impossible with these
> > >settings.
> >
> > By "Save" do you mean "Post and Commit"? You can never prevent
> overwriting
> > of others' work once it is committed, if your transaction is newer
> than the
> > one that committed the work.
> >
> >
> > >A part of this app use Clientdatasets and they use all fields in
> > >where part of the update statement and they actually capture thisIBO
> > >problem - that's why I asked wether it was possible to make the
> > >components do the same.or I
> > >
> > >I think :-) I understand why IB/FB (and therefore IBO) shouldent
> > >actually need this, as the architecture of the database (with
> > >recversion's) should handle this - it just dosen't seem to work -
> > >at least can't seem to get it working - or am I still not gettingit??
> > >:-)not
> >
> > I think what you are not getting is that work that is posted but
> > committed is protected. Committed work is always available for anew
> > transaction to update.database
> >
> > And, whatever you believe a clientdataset can do, it can NOT do a
> partial
> > update on any record in InterBase or Firebird - EVER. The
> > implementation of transaction isolation rules - no interface canthe
> change that.
>
> Perhaps confusing is that Jens wrote about getting exceptions from
> FB/IB when user B changed a record that user A read before, editted
> it and post/commit it after user B's change.
> The exception is not raised by FB/IB but by the application that
> checks if the DML statement actually affected any rows (by reading
> RowsAffected) property. That DML statement will not affect any rowsThat was my point exactly! I dont care wether the exception comes from
> when its where clause contains conditions that retrieve the original
> record first before updating it.
the database or the application.
I was doing a post and commit and now I understand that when committed
the database will not throw an exception when another update that was
read with a earlier recordversion does it's update - and will
therefore possibly do an overwrite.
It's this exact issue the clientdataset resolves by using all the
fields in the dataset and checking wether anything was updated after
it has been executed. I am aware that this is not an database
exception but an application exception but it solves the issue of
owerwriting another users committed changes.
If we all understand each other now :-) (sorry if I was not making my
self clear enough) let me try to ask again :
Does IBO have any means of solving this spesific issue - making sure
that one users committed changes is not overwritten by another users
committed changes? (something like the clientdataset solution)