Version: 2.1
Back to:
TBLVIEW is a utility that allows viewing of database tables, views and user-defined SQL SELECT queries. Tables can be opened from all databases supported by LEA applications (see Using Databases in LEA Applications - LEA Database Formats).
TBLVIEW also enables tables to be searched and printed, and exported to text and HTML files.
TBLVIEW displays data as read-only - tables cannot be altered and values cannot be edited. To import data into tables, or to edit values use the TBLEDIT utility.
Select a table to open from the File-Open menu, drag a table file from an Explorer window onto the TBLVIEW window, or specify a database and table to open on the command-line:
TBLVIEW can be run with a command-line similar to the following:
TBLVIEW [[-remote] -uCONNECTSTRING] [-d] [TABLENAME]
or
TBLVIEW [-d] [TABLEPATH]
where:
The optional switch -u specifies an Oracle connection
string in the form USERNAME/PASSWORD@DATABASE in the same format as used
by Oracle SQL*Plus and other Oracle utilities. You can also use default OS-user
authentication if the database is configured to accept this by using a
connection string /@DATABASE. The additional optional switch
-remote allows you to connect to an Oracle database when the Oracle
client is not installed - in this case the connection string should be of the
form USERNAME/PASSWORD@HOSTNAME:PORTNUMBER:SID (see
Using Databases in LEA Applications -
Oracle Connection).
The optional switch -d instructs
TBLVIEW to display the Definition tab rather than
the default Data tab.
TABLENAME is the name of a table, view or
synonym within the database specified above. If no CONNECTSTRING is
specified, you will be prompted with a login dialogue to connect to Oracle. The
table name should include a schema if it is not a public synonym or owned by
the specified user.
TABLEPATH is the complete path of a dBASE
database table file.
TBLVIEW displays the data and structure of database tables and SQL SELECT queries. It has the following menu options:
All TBLVIEW windows are listed in the Window menu - you can switch between windows by selecting the window's title from the menu.
The Data tab displays the contents of the table/view/query in a grid.
For Oracle tables/views, you can order on a column in ascending or descending order by clicking the column header. To order by more than one column, hold down SHIFT while clicking the column header. You can also filter the displayed records using the filter bar, to display only records which match some criteria you specify. Click the top-left corner of the grid to display a popup menu, and click Filter bar. Enter your filter conditions, and then right-click the top-left corner of the grid to apply your filter.
The filter bar will look something like this:
You can type expressions in the edit boxes under the column titles to filter the records displayed. Each filter statement is of the form
[RELATIONALSIGN]STATEMENT
Where RELATIONALSIGN is one of the following =, <>, <,
>, <=, >=. Omitting the sign has the same effect as using the equals
sign (=).
STATEMENT is any alphanumeric text which is of a valid data
type for the corresponding field. For string fields you can specify a filter
mask (wildcard) in the statement substituting masked characters with an
asterisk or percent ('*' or '%') symbol. To substitute a single character use
the underscore ('_') symbol.
The example displayed above limits the displayed records to those where the FILEPATH contains 'IMAGE' and the FILESIZE is greater than 1000.
The data grid also allows interactive searching for a specific record (applicable for both Oracle and dBASE tables). Click the top-left corner of the grid to display a popup menu, and click Search bar. This will display the search bar at the top of the grid. Then select the column and start typing the leading characters of the record you want to locate in the grid. The current record pointer will be moved to the nearest match found in the table.
Memo fields will be displayed in the grid with a ... button in each grid cell. Click the button to open the memo field viewer (see Using Databases in LEA Applications)
The definition tab displays the structure of the current table or view.
Each field name is listed with its native data type.
For dBASE tables, the native type and width/precision of each field in the table is listed.
For Oracle tables and views the following information is displayed from the database's data dictionary:
The information displayed here can also be saved to file using the Export Structure menu option.
For user-defined queries created with the Database-Edit Query menu option, structure information is not available.
This dialogue is displayed by the Database-Query Editor menu option, and is only valid when you are connected to an Oracle database.
You can enter any valid Oracle SQL SELECT query, and the results will be
displayed in the data grid.
You cannot use this query editor to execute
INSERT, UPDATE or DELETE statements, or perform any other DML or DDL..
The buttons in the toolbar and popup menu provide the following options:
See also: