USP_DATAFORMTEMPLATE_ADD_SQLVIEWSPEC

The save procedure used by the add dataform template "SQL View Spec Add Data Form".

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier INOUT The output parameter indicating the ID of the record added.
@SQLVIEWSPECXML xml IN Sql View spec in form of Xml
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.

Definition

Copy

CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_SQLVIEWSPEC

  @ID uniqueidentifier = null output,
  @SQLVIEWSPECXML xml = null,
  @CHANGEAGENTID uniqueidentifier = null
)
as

set nocount on;

if @CHANGEAGENTID is null  
    exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output

begin try
    exec dbo.USP_LOADSPEC @SPECXML=@SQLVIEWSPECXML, @CHANGEAGENTID=@CHANGEAGENTID
end try

begin catch
    exec dbo.USP_RAISE_ERROR
    return 1
end catch

return 0