Re: Is there ever a reason to have a transaction around a select..



That's what we're doing too. Thank you.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




"Cor Ligthert [MVP]" wrote:

David,

Concurrency problems are a little bit overdone in past. The method is
changed. Were we (you and me) were locking everything that could go wrong,
we now are just checking afterwards if everything is still the same as we
have read it, as we are writting it back before we are doing that.

Advantage from this optimistic concurrency approach is.
- everybody can go on working
- no deadlocks anymore
- no checking for "reading" data and "to update" data.
- one way of accessing.

Disadvantage
- sometimes the update has to be done twice.

However I agree that it sounds dangerous in the beginning.

Cor


"David Thielen" <thielen@xxxxxxxxxxxxx> schreef in bericht
news:B79A238F-5EA1-4EB5-B92F-26EE474C328C@xxxxxxxxxxxxxxxx
This transaction stuff sure is complicated in the details. Off the top of
my
head self-consistent would be:
1) No duplicated rows.
2) If rows are being changed, we get it either all old or all new data -
but
not half & half.
3) No skipped rows (if the row existed both before/after the select).

?????

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




"Miha Markic [MVP C#]" wrote:

Depends on default implicit transaction defined by database on what
records
you get.
Anyway, what exactly are "self-consistent" records?

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
"David Thielen" <thielen@xxxxxxxxxxxxx> wrote in message
news:82C164CA-07CB-4520-9779-593F604D7338@xxxxxxxxxxxxxxxx
I guess my question is if there is no transaction, will the ResultSet
come
back self-consistent? I know a split-second later it could be wrong as
an
insert or update can hit the table but that is also true with a
transaction
after I call Commit after the select.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




"Miha Markic [MVP C#]" wrote:

It depends on your requirements but usually there is no need for
(explicit)
transaction.

--
Miha Markic [MVP C#, INETA Country Leader for Slovenia]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"David Thielen" <thielen@xxxxxxxxxxxxx> wrote in message
news:88DB2D9D-01F6-403F-93AF-1CABC892247B@xxxxxxxxxxxxxxxx
1) that will always return 0 or 1 rows?

2) that will retun N rows?

In each case where the results will be displayed to the user and so
there
can be changes that occur to the DB after the select completes.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm









.



Relevant Pages

  • Re: Is there ever a reason to have a transaction around a select..
    ... Concurrency problems are a little bit overdone in past. ... Cubicle Wars - http://www.windwardreports.com/film.htm ... what exactly are "self-consistent" records? ... Blog: http://cs.rthand.com/blogs/blog_with_righthand/ ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Is there ever a reason to have a transaction around a select..
    ... This transaction stuff sure is complicated in the details. ... Cubicle Wars - http://www.windwardreports.com/film.htm ... what exactly are "self-consistent" records? ... Blog: http://cs.rthand.com/blogs/blog_with_righthand/ ...
    (microsoft.public.dotnet.framework.adonet)