|Products | Download | Buy | About Us|
|Connect XML-2-DB User's Guide|
5(d). Sequence Reference Information - <sequence-reference-information>
(only for Oracle)
For Oracle databases, Connect XML-2-DB storing the next value of a specified sequence into a database column. A sequence value can also be passed in as a parameter to a procedure. For each sequence that is used in such a manner a sequence reference must be defined in the mapping file by creating a <sequence-reference-information> element Once these sequences have sequence references defined for them, they can be referred to in the other mapping rules.
For Oracle, the element <sequence-reference-information> has the format:
<!ELEMENT sequence-reference-information EMPTY> <!ATTLIST sequence-reference-information seq-reference CDATA #REQUIRED seq-name CDATA #REQUIRED object-owner CDATA #IMPLIED >
The attribute seq-reference is a user-defined reference name that will be used to refer to this sequence in other mapping rules.
The attribute object-owner must have the schema name. It defaults to the login id that you connected to, which is provided in the database configuration file.
Some examples of sequence-reference-information elements are listed below:
<!-- For Oracle --> <sequence-reference-information seq-reference="ADDRESS_ID_SEQ" seq-name="ADDRESS_ID_SEQ" object-owner="USER1"> </sequence-reference-information>
The attribute seq-name must be set to the name of the sequence. The value of seq-name must be provided in the same case as in Oracle's data dictionary. For sequences that were NOT created using quotes around the sequence name, the sequence name must be provided in upper case. For example, if a sequence was created using the following statement, the seq-name attribute value must be specified in uppercase.
create sequence Address_id_seq; <sequence-reference-information seq-reference = "ADDRESS_ID_SEQ" seq-name="ADDRESS_ID_SEQ" owner="TESTUSER1"/>
If a sequence was created using quotes, the seq-name attribute value
must be specified in mixed case.
create sequence "Address_Id_seq"; <sequence-reference-information seq-reference = "ADDRESS_ID_SEQ" seq-name="Address_Id_seq" owner="TESTUSER1"/>
|Copyright © Skyhawk
Systems. All Rights Reserved.
Send comments and questions to firstname.lastname@example.org.