Re: Can this be done??

From: CT (carstent_at_spammersgoawaydotnetservices.biz)
Date: 04/28/04


Date: Wed, 28 Apr 2004 10:21:08 +0200

Not quite, as the updated rows haven't been commited yet.

-- 
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Akhil Bansal" <akhil_bansal20@hotmail.com> wrote in message 
news:Ok3qHSNLEHA.1612@TK2MSFTNGP12.phx.gbl...
> Hi Kevin / Morten
>    I think it is possible.
>    What you have to do is Just Create a insert Trigger on the table in
> which you are inserting the record and in the Trigger just write the
> statement
>        Select * from Inserted
>
> as Inserted table contains the newly inserted rows and fires one time of a
> insert.
> I thing this should work.
>
>
> regds.....
> Akhil
>
>
>
>
> "Kevin Yu [MSFT]" <v-kevy@online.microsoft.com> wrote in message
> news:TtTwbpMLEHA.2520@cpmsftngxa10.phx.gbl...
>> Thanks for Bill's quick response!
>>
>> Hi Morten,
>>
>> First of all, I would like to confirm my understanding of your issue. 
>> From
>> your description, I understand that you need to create a SELECT command
>> that will only return the records inserted within the transaction which
>> hasn't been committed. If there is any misunderstanding, please feel free
>> to let me know.
>>
>> As far as I know, this is impossible to be achieved in transaction.
> Because
>> the SQL server database engine commits and rolls back transactions by
>> checking the transaction log. However, the transaction log cannot be
>> accessed by SELECT statement.
>>
>> For workaround, I think you can insert the new records into a DataSet and
>> use DataSet.GetChanges to get the newly inserted rows. For more
> information
>> about DataSet.GetChanges method, please check the following link:
>>
>>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
>> frlrfSystemDataDataSetClassGetChangesTopic.asp
>>
>> HTH. If anything is unclear, please feel free to reply to the post.
>>
>> Kevin Yu
>> =======
>> "This posting is provided "AS IS" with no warranties, and confers no
>> rights."
>>
>
> 


Relevant Pages

  • Re: Can this be done??
    ... > As far as I know, this is impossible to be achieved in transaction. ... > the SQL server database engine commits and rolls back transactions by ... the transaction log cannot be ... > use DataSet.GetChanges to get the newly inserted rows. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Can this be done??
    ... this is impossible to be achieved in transaction. ... the SQL server database engine commits and rolls back transactions by ... the transaction log cannot be ... use DataSet.GetChanges to get the newly inserted rows. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: [PATCH] Fix bad data from non-direct-io read after direct-io write
    ... commits the transaction. ... ->releasepage if jbd is committing the transaction. ... page cache while dio holds a page reference. ...
    (Linux-Kernel)
  • Re: What are dirty pages?
    ... > buffer pool, so it does not match what is on disk. ... > When a transaction commits, the LOG records for that transaction are ...
    (microsoft.public.sqlserver.server)
  • Re: Asynchronous Commit in Oracle Database 10g R2
    ... >> Committing a transaction in a manner which ... more rapidly than standard commits. ... I still stand by my statements with regard to OLTP applications. ... apologise for not making that sentiment clear in my previous response. ...
    (comp.databases.oracle.server)