Storing a Message to a Database

Store an XML document to a database using the XML-to-SQL mapping functions.

  1. For the appropriate ASE connection profile and database, select the appropriate procedural object.
    Object How to select
    Stored procedure Expand the Stored Procedures folder, right-click the stored procedure, and select Edit.
    Trigger Expand the Tables folder, expand the table, and then expand the Triggers folder. Right-click the trigger and select Edit.
  2. In the Source page, place the cursor in the desired location within the SQL code, right-click and select Sybase_ASE_15.x > SQL/XML Wizard.

    You can also open the SQL/XML wizard from the ASE XML Services icon ASE XML Services icon on the toolbar.

  3. Choose the script type to generate.
    Field Action
    Need to Generate 'create' Statement Generate a SQL create statement.
    Need to Generate 'insert' Statement Generate a SQL insert statement.
    XML Error Handling Select an error-handling option: exception, null, or message.
  4. Click Next to continue.
  5. Specify the necessary XML schema by modifying one of the following input fields.
    Field Action
    Variable Enter a variable or choose an existing one. Variable names begin with "@".
    Document Enter the content of the XML document, or choose Browse to point to an existing XML document.
    Embedded Expression Enter an embedded expression.
  6. Click Next to modify another input field, or click Finish to create the XML-to-SQL mapping.
Related concepts
Mapping Functions
Related tasks
Constructing an XML Document from Table Data
Generating XML Schema for Real-Time Messaging Services

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com