Re: ado.net tricky transaction question
From: David Browne (meat_at_hotmail.com)
Date: 02/15/04
- Next message: Yair Cohen: "Re: lazy load, very lazy ...."
- Previous message: William Ryan eMVP: "Re: DataObjects.NET opinions"
- In reply to: wrxguru: "ado.net tricky transaction question"
- Next in thread: William \(Bill\) Vaughn: "Re: ado.net tricky transaction question"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 15 Feb 2004 11:17:26 -0600
"wrxguru" <wrxguru@iprimus.com-dot-au.no-spam.invalid> wrote in message
news:402f4be6_2@Usenet.com...
> I think I do understand the identity columns and usage however my
> question remains that if I wish to see what has just been inserted
> into the database within a transaction am I able to do this within
> the same transaction ?
>
Yes. You can always see your own changes. However you can only see the
changes inside the same connection. If you are using a second connection
you cannot see the changes.
In Query Analyzer, each window is a seperate connection. If in one window
you run
CREATE TABLE T(I int)
go
begin transaction
insert into t(i) values(1)
and then
select * from T,
you will see the row.
If you run
select * from T
from another window, it will block untill you commit or rollback your
transaction.
BTW this is only the first problem you will encounter generating your own
incrementing keys, so you really should use an Identity column.
David
- Next message: Yair Cohen: "Re: lazy load, very lazy ...."
- Previous message: William Ryan eMVP: "Re: DataObjects.NET opinions"
- In reply to: wrxguru: "ado.net tricky transaction question"
- Next in thread: William \(Bill\) Vaughn: "Re: ado.net tricky transaction question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|