DB_DATA_AUX_SQL

Syntax

Example

Description/Remarks

DB_DATA_AUX_SQL "database_type"

DB_DATA_AUX_SQL "DMS"

DB_DATA_AUX_SQL "DMS?"

DB_DATA_AUX_SQL "DMS*"

 

See XML and Record Buffer Template Commands for sample templates showing how the XML and Record Buffer commands work together.

Returns a SQL string to be used to insert into the DDAT_AUX table.

If you have removed unused columns from the DDAT_AUX table in the current configuration, this command will automatically detect which traceability columns remain and will adjust the SQL string accordingly.

Three options are available for the database_type parameter.

With the "DMS" parameter, this command returns a string for use with the SQL INSERT command. If you want to do things such as UPDATE, build your own string with the DB_SET_VALUE and DB_VALUE commands.  If a value has not been set, a default will be returned.

With the "DMS?" parameter, this command returns a "0" if no fields in the DMS AUX buffer have been set, and returns a "1" if at least one field in the DMS AUX buffer has been set.  This allows you to check to see if the record needs to be saved. Once a value has been set, it will always return a "1" until that value has been cleared by setting it to an empty string.

With the "DMS*" parameter, this command returns the entire INSERT SQL string, including the "INSERT INTO" text at the beginning of the string.