Database lookup Tcl extension

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? sets the maximum returned row count. By default, at most one record is returned from the dblookup command. With this option, at most the specific count records are returned. To get all the selected records, set this option without count.

-metacolumnname 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

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

dblookupdestroy table