How Do I Generate a Unique ID for a Form to Store the Form’s Data in the Database?

How Can We Help?

< Back

Answer

  1. Create a procedure in the database with the input parameter and NEWID() function in the procedure’s body.

The parameter is not going to be used in the procedure but is necessary in order to map the procedure output to a form’s control using an Integration wizard which will require the input a value in the Input Parameter tab.

  1. Map the control on the form to the procedure’s output as follows:
CREATE PROCEDURE <ProcedureName>
@type varchar(50)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SELECT NEWID() as <IDName>
END
Comments are closed.

This is the legacy version of the XMPro Documentation site. For the latest XMPro documentation, please visit documentation.xmpro.com

X