USE [task]
GO
/*==========================================================
Server: test
DataBase: task
Author: aaa
SPName: UP_UPdateData
Version: 1.0
Date: 2009-11-15
Content: UP_UPdateData
* Parameters
* --------------------------------------------------------
* Input :
*
* Output : N/A
*
*
* Table Used :
* ---------------------------------------------------------
* dbo.tblTask
-----------------------------------------------------------
Modified history:
Date Modified by VER Description
------------------------------------------------------------
2009/11/15 XXX 1.00
==========================================================*/
CREATE PROCEDURE dbo.UP_UPdateData
(
@TaskID INT
)
AS
BEGIN
SET NOCOUNT ON
SET XACT_ABORT ON --使用分散式交易需要(使用串連伺服器)
BEGIN TRY
BEGIN TRANSACTION
--更新連結的伺服器上的表資料(dbserver.dbname.dbo.Tablename)
IF (@@RowCount > 0)
BEGIN
--插入本機資料
END
COMMIT TRANSACTION
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
END CATCH
END
GO