30 lines
965 B
Plaintext
30 lines
965 B
Plaintext
CREATE PROCEDURE [dbo].[sp_SensorsUARTUpdate]
|
|
@Id INT,
|
|
|
|
@BaudRate INT,
|
|
@DataBits INT,
|
|
@StopBits NVARCHAR (50),
|
|
@Parity NVARCHAR (50),
|
|
@FlowControl NVARCHAR (50),
|
|
@DataFormat NVARCHAR (50),
|
|
|
|
@LastModified DATETIME,
|
|
@LastModifiedBy NVARCHAR (50),
|
|
@UserTags VARBINARY (MAX),
|
|
@Broken BIT,
|
|
@DoNotUse BIT,
|
|
@errorNumber INT OUTPUT,
|
|
@errorMessage NVARCHAR (255) OUTPUT
|
|
AS
|
|
BEGIN
|
|
SET @errorNumber = 0
|
|
SET @errorMessage = ''
|
|
|
|
UPDATE [dbo].SensorsUART SET [BaudRate]=@BaudRate, [DataBits]=@DataBits, [StopBits]=@StopBits, [Parity]=@Parity, [FlowControl]=@FlowControl, [DataFormat]=@DataFormat, [LastModified]=@LastModified, [LastModifiedBy]=@LastModifiedBy, [UserTags]=@UserTags, [Broken]=@Broken, [DoNotUse]=@DoNotUse WHERE [SensorId] = @Id
|
|
|
|
IF(@@error != 0)
|
|
BEGIN
|
|
SET @errorNumber = error_number()
|
|
SET @errorMessage = error_message()
|
|
END
|
|
END |