This is a module for monitoring any data from any database accessible through ODBC.

On UNIX type platforms, it requires the tclodbc package (at http://tclodbc.sourceforge.net/).
On Windows platforms, please read the install.txt file.

Data is retrieved using the SELECT * FROM table query if a table name is passed as argument using the --t (--table) switch, or using the query passed as argument using the --q (--query) switch (SELECT queries work, as may others that return row/column data). Resulting data is initially displayed in 1 table.

Error handling:

When an error occurs (communicating with the database server or any other type), all rows disappear and the displayed table becomes empty. A descriptive error message is also generated in such a case.

Module options:

- --dsn
  mandatory ODBC Data Source Name (see your database/system administrator if in doubt)
- -q (--query)
  specifies any valid query (SELECT type, with table names qualified with their database name using the dot notation, see examples below). Cannot be used along with the table option.
- --swap
  swap rows and columns in displayed table. The database table column names are then displayed vertically in the leftmost column of the displayed table.
- -t (--table)
  specifies the table name (must be qualified with the database name using the dot notation, see examples below). Cannot be used along with the query option.
- --user
  database user name (defaults to current user).
- --password
  database password for user (no default).

Examples:

    $ moodss odbcquery --dsn test -t base.table
    $ moodss odbcquery --dsn hr --user root --password xxx --table compamy.employees
    $ moodss odbcquery --dsn test -q 'select * from database.table order by column'
    $ moodss odbcquery --dsn mysqltest --query 'show variables'

Threads support:

If you use Tcl/Tk 8.4.1 or above with the Tcl Threads package 2.5 or above, then the module will use threads for the database connection. This means that the core (moodss user interface for example) cannot be hung (moodss menus not responding, window not being updated, ...) when the connection with the database is failing.
You can check that moodss actually is in threads mode by looking at the bottom line of the module help window, while moodss is running: a status line will indicate whether threads are in use.