Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Help me

Author  Topic 

vedjha
Posting Yak Master

228 Posts

Posted - 2008-09-26 : 09:32:21

declare @name varchar(500)
declare @ids varchar(20)
set @ids='U100000000'
begin tran
select @name=vastname from login where aid = @ids
if @name is not null
begin
update request123
set vasname=@name where vAsid=@ids
print @name
commit tran


end

else
begin
print 'Invalid ID'
rollback tran
end



How to know Update Command is Complete
it gives a number , how to store these numbers
as
0-commit Tran
1-Rollback Tran
I m not sure ...

Ved Prakash Jha

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-26 : 09:35:10
it will complete upon executing commit tran or rollback line
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-26 : 09:39:21
what's that you're trying to find? the status of update operation?
Go to Top of Page
   

- Advertisement -