Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SqlTransaction problem

Reply
Thread Tools

SqlTransaction problem

 
 
Neven Klofutar
Guest
Posts: n/a
 
      11-23-2005
Hi,

I'm trying to retrieve some information from DB using SqlTransaction, but I
have a problem.
I'm executing some DELETE SQL statements using Transaction. Then later on
(because of the lousy project) I need to read the same information from DB
that is beeing deleted using the same transaction.

Is it possible to delete data, and read the same data in one SqlTransaction,
or that Transaction cannot read the data anymore even if Commit() haven't
been executed jet ?

thanx, Neven


 
Reply With Quote
 
 
 
 
David Browne
Guest
Posts: n/a
 
      11-23-2005

"Neven Klofutar" <neven.klofutar@**re...m.o..v...e**vip.hr> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I'm trying to retrieve some information from DB using SqlTransaction, but
> I have a problem.
> I'm executing some DELETE SQL statements using Transaction. Then later on
> (because of the lousy project) I need to read the same information from DB
> that is beeing deleted using the same transaction.
>
> Is it possible to delete data, and read the same data in one
> SqlTransaction, or that Transaction cannot read the data anymore even if
> Commit() haven't been executed jet ?
>


Changes made in the transaction are immediately visible inside the
transaction. Outside the transaction, the the rows are locked.

Perhaps you could dump the data into a temp table before you delete it.

David


 
Reply With Quote
 
 
 
 
Neven Klofutar
Guest
Posts: n/a
 
      11-24-2005
OK, thanx.

Neven

"David Browne" <davidbaxterbrowne no potted http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
>
> "Neven Klofutar" <neven.klofutar@**re...m.o..v...e**vip.hr> wrote in
> message news:(E-Mail Removed)...
>> Hi,
>>
>> I'm trying to retrieve some information from DB using SqlTransaction, but
>> I have a problem.
>> I'm executing some DELETE SQL statements using Transaction. Then later on
>> (because of the lousy project) I need to read the same information from
>> DB that is beeing deleted using the same transaction.
>>
>> Is it possible to delete data, and read the same data in one
>> SqlTransaction, or that Transaction cannot read the data anymore even if
>> Commit() haven't been executed jet ?
>>

>
> Changes made in the transaction are immediately visible inside the
> transaction. Outside the transaction, the the rows are locked.
>
> Perhaps you could dump the data into a temp table before you delete it.
>
> David
>



 
Reply With Quote
 
prabhupr@hotmail.com
Guest
Posts: n/a
 
      11-26-2005
if this does not work, look into SQL Triggers and within that look for
"DELETED" table data


Neven Klofutar wrote:
> OK, thanx.
>
> Neven
>
> "David Browne" <davidbaxterbrowne no potted (E-Mail Removed)> wrote in
> message news:(E-Mail Removed)...
> >
> > "Neven Klofutar" <neven.klofutar@**re...m.o..v...e**vip.hr> wrote in
> > message news:(E-Mail Removed)...
> >> Hi,
> >>
> >> I'm trying to retrieve some information from DB using SqlTransaction, but
> >> I have a problem.
> >> I'm executing some DELETE SQL statements using Transaction. Then later on
> >> (because of the lousy project) I need to read the same information from
> >> DB that is beeing deleted using the same transaction.
> >>
> >> Is it possible to delete data, and read the same data in one
> >> SqlTransaction, or that Transaction cannot read the data anymore even if
> >> Commit() haven't been executed jet ?
> >>

> >
> > Changes made in the transaction are immediately visible inside the
> > transaction. Outside the transaction, the the rows are locked.
> >
> > Perhaps you could dump the data into a temp table before you delete it.
> >
> > David
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SqlTransaction problem pers ASP .Net 4 07-13-2010 05:56 PM
SQLTransaction IsolationLevel questions eric.goforth@gmail.com ASP .Net 0 06-07-2006 04:21 PM
SqlTransaction Record Not Found Joe Rigley ASP .Net 0 11-11-2005 06:31 PM
SqlTransaction issue Piotr Strycharz ASP .Net 5 12-16-2004 08:28 AM
Help! SQLTransaction and Identity(?) column in SQL Server 2K .Net Newbie ASP .Net 2 07-09-2004 09:50 AM



Advertisments