USP_DATAFORMTEMPLATE_EDITLOAD_COUNTRYADDRESSFORMAT
The load procedure used by the edit dataform template "Country Address Format Edit Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
@DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
@NAME | nvarchar(50) | INOUT | Name |
@FORMATSTRING | nvarchar(max) | INOUT | Format string |
@ADDRESSFORMATS | xml | INOUT | Address Formats |
@TSLONG | bigint | INOUT | Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record. |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_COUNTRYADDRESSFORMAT
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@NAME nvarchar(50) = null output,
@FORMATSTRING nvarchar(max) = null output,
@ADDRESSFORMATS xml = null output,
@TSLONG bigint = 0 output
)
as
set nocount on;
begin try
select
@DATALOADED = 1,
@NAME = FORMATNAME,
@FORMATSTRING = FORMATSTRING
from dbo.COUNTRYADDRESSFORMAT
where ID = @ID
select @ADDRESSFORMATS = (
select
ID as FORMATID,
FORMATSTRING
from
dbo.COUNTRYADDRESSFORMAT
for xml raw('ITEM'),type,elements,root('ADDRESSFORMATS'),BINARY BASE64
)
end try
begin catch
exec dbo.USP_RAISE_ERROR
return 1
end catch
return 0