dblookup Tcl command usage

The dblookup Tcl command can be used in engine Tcl UPoCs for the translation thread and in the inbound/outbound protocol thread UPoCs.

dblookupdestroy is not required when using dblookup at engine runtime. The engine automatically destroys the resources that were used by the Database Lookup table during shutdown.

  • dblookup ?-maxrow ?count?? ?-metacolumnname? table value ?value...?

    This looks up database data through a Database Lookup table that is based on the given value. The table is a Database Lookup file name. The file extension can be omitted.

    The input values that are provided by dblookup are set as the IN column values one-by-one. The input value account equals the IN column account that is defined in the .tbl file. If they are not matched, then an error is prompted and the DB Lookup terminated.

    • -maxrow ?count?

      This sets the maximum returned row count. By default, at most one record is returned from the dblookup command. With this option, the specific count records are returned. To get all the selected records, set this option without count.

    • -metacolumnname

      This gets the column names from result set metadata. With this option, both the selected database data and column names of result set metadata are returned in a keyed list.

  • dblookupdestroy table

    This destroys the related resources. For example, the JNI context and database connection, used by dblookup. This command returns an empty string.