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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Error:7391

Author  Topic 

vanisa
Starting Member

10 Posts

Posted - 2009-08-20 : 08:14:04
Hi all,

I got end up with an error if i use Begin Tran in my linked server procedure.

If i don't use Begin Tran, it works fine.Pls help me out which is very urgent requirement

I place my code here
ALTER procedure Changepassword
@oldPassword varchar(256),
@newPassword varchar(256),
@confirmPassword varchar(256),
@userid smallint,
@OUT INT=0 OUTPUT

as
declare @ismatch smallint

IF(@userid = '' or @userid = 0)
BEGIN
SET @OUT = 101
RETURN @OUT
END

IF(@newPassword <> @confirmPassword)
BEGIN
SET @OUT = 102
RETURN @OUT
END

----------------------------
BEGIN TRAN

-----------------------------

update users set password=pwdencrypt(@newPassword),PasswordUpdateTime=getdate() where userid=@userid
--SET XACT_ABORT ON
update test01.Scdevelopment.dbo.users set password=@newPassword where userid=5370


commit tran
--------

If i execute the procedure with Begin tran,the following error occurs.

Server: Msg 7391, Level 16, State 1, Procedure Updateusername, Line 40
The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a].



   

- Advertisement -