Developer Documentation Library > Data Model > Available DSCs > Relational MR database (RDB) CDSC > Stored procedures
 
Stored procedures
Stored procedures created by RDB DSC 2
sp_ReserveResponseSerial
Used to retrieve the next serial number for the project from the ResponseSerial table. However, if sp_ReserveResponnseSerial fails to insert the new number into the Responses2 table, it executes sp_ReserveResponnseSerialEx. This handles situations where nonconsecutive serial numbers have been used. For more information, see ResponseSerial table.
sp_ReserveResponseSerialEx
sp_ReserveResponseSerialEx locks the entire Responses2 table to find the maximum value of the serial number, increments it, inserts the new serial number into the Responses2 table, and returns the number to the client. Used when sp_ReserveResponseSerial fails to insert the new number into the Responses2 table.
rdb_ReserveLevelSerial
The stored procedure used to reserve a new serial(x) number in the LevelResponses(x) table based on the VaribleID of unexpanded loop in the Variables Table. The rdb_ReserveLevelSerial stored procedure is based on the rdb_ResponseResponseSerial stored procedure.
Stored procedures created by RDB DSC
sp_ReserveSerial
Retrieves the next serial number for the project from the ResponseSerial table. However, if sp_Reserve_Serial fails to insert the new number into the Responses table, it executes RESERVE_SERIAL_EX. This handles situations where nonconsecutive serial numbers have been used and where an earlier version of the Relational MR Database CDSC has connected and incremented the serial number using RESERVE_SERIAL_EX. For more information, see ResponseSerial table.
sp_ReserveOtherID
Retrieves the next number to use for OtherId, the unique identifier in the OtherData table. sp_ReserveOtherID uses the OtherID table to retrieve the highest value currently stored in the OtherID column in the OtherData table. For more information, see OtherID table.
RESERVE_SERIAL_EX
Used by UNICOM Intelligence Data Model 2.3 and earlier to retrieve the next serial number for the project. RESERVE_SERIAL_EX locks the entire Responses table to find the maximum value of the serial number, increments it, inserts the new serial number into the Responses table, and returns the number to the client. Also used by UNICOM Intelligence Data Model 2.4 and later when sp_ReserveSerial fails to insert the new number into the Response table.
CREATE_COLUMN
Called when the UNICOM Intelligence Data Model runs the xp_syncdb extended stored procedure to synchronize the database with an MDM document. CREATE_COLUMN is called for each variable in the project to create a row in the Variables table.
AUTO_ASSIGN_LEVEL_ID
Reserved for future use.
WRITE_LONG
Reserved for future use.
WRITE_TEXT
Reserved for future use.
WRITE_DATE
Reserved for future use.
WRITE_DOUBLE
Reserved for future use.
RESERVE_SERIAL
This stored procedure is obsolete; do not use it.
See also
Relational MR Database CDSC schema
WHERE expressions supported natively
Relational MR database (RDB) CDSC