CREATE PROCEDURE dbo.updateSource (
  @SourceID uniqueidentifier OUTPUT,
  @Site uniqueidentifier,
  @FilePath nvarchar(512),
  @Status nvarchar(20),
  @Parser nvarchar(15),
  @LineNumber int,
  @Length bigint,
  @LastWrite datetime,
  @ReProc bit,
  @Comment nvarchar(256) = NULL
) AS
BEGIN TRAN

UPDATE [LogSource] SET [ID] = @SourceID, [Site] = @Site, 
  [FilePath] = @FilePath, [Status] = @Status, [Parser] = @Parser, 
  [LineNumber] = @LineNumber, [Length] = @Length, 
  [LastWrite] = @LastWrite, [ReProc] = @ReProc, 
  [Comment] = @Comment WHERE [ID] = @SourceID
IF (@@ERROR <> 0)
  BEGIN
    ROLLBACK TRAN
  END
ELSE
  BEGIN
    COMMIT TRAN
  END
RETURN
