main logo
Subject: Re: Transaction
Author: Frank Schima
Posted: 2000/11/30 12:22:47
 
View Entire Thread
New Search


--- Ruslan Zasukhin <sunshine AT public D.OT kherson.ua> wrote:
> on 30/11/00 17:47, Aaron Bratcher at aaronbratcher@mac.com wrote:
>
> > So if Im in the middle of a transaction and I do this:
> >
> > START Transaction
> > t1.add ...
> > select from t1 ...
> > COMMIT
> >
> >
> > Will my SQL select reflect the just added record even when I have not done a
> > commit yet?
>
> All my life I did think that you will see it in selection,
> and I become mad when try invent how to implement this.
>
> But several weeks ago, in discussion with our Windows developer which is
> good SQL Server developer, he said that NO(!!!) you will not see it in
> selection, because this record is not added to original table.
>
> So it become EASY implement this requirement of transaction: other users do
> not see your changes until you commit changes, as payment you don't see them
> also...
>
> I still not sure if this is correct and will check later.

In Sybase 11, a Select inside a Transaction _will_ reflect all the changes made before the Commit.
If an outside user tries the query, they will be locked out until the Transaction is complete.
However it is possible for an outside user to override that (I forget how exactly) and read the
current state of the locked records - which will include all the uncommitted changes.

Just to clarify: All changes actually occur and are stored in the tables during a Transaction. A
Rollback command will go back and undo all changes based on the transaction log - whereas a Commit
will simply leave everything untouched and unlock the tables. During a Transaction, everyone else
is Locked out of the records associated with the Transaction (actually Sybase 11 does page locking
not record locking - I'm not sure about Sybase 12).


Best Regards,
Frank


=====
Frank Schima <mailto:macsforever2000 AT yahoo D.OT com>
Yahoo Messenger Chat <macsforever2000>
DISYS Inc. <http://www.disys.com/>
Columbia, MD USA <http://columbiamaryland.com/>

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

-------------------------------------------------------------
The Valentina mailing list is brought to you by MacServe.net
For info on lists services, see http://www.macserve.net/lists.html
 
©2000 Frank Schima
<-- Prior Message New Search Next Message -->