dblookup

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 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 Database Lookup terminated.

  • -maxrow ?count?

    This sets the maximum returned row count. By default, at most one record is returned from the dblookup command. When you use this option, at most 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.

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