SQLite Viewer

SQLite Viewer is a simple program designed let the user view SQLite databases. The database structure is displayed in a data tree object. Records from tables selected in the data tree are automatically loaded in to the data grid. It uses an Open-Face user interface.

The SQLite Viewer Window

Open-Face refers to programs where the visual interface is a screen containing objects used in the running program. All the controls are contained in a single visible window or sub-windows. Most of these programs share a common motif explained below. The look and feel is completely un-planned and simply represents what I have come up with as I have continued development of TCB.

When SQLite Viewer starts-up, the user is presented with the Windows as shown in the image below.

c!--lick to enlarge

On the left top of the wndow are 3 labels Current Database, Tables, and Cur Table. The boxes below the are filled with relevant data. over to the left are two sets of labels and drop-down boxes Data Sets and Recordsets. On the left of the windows below Current Database is a set of six graphic buttons described below. Below those buttons is a data grid. Just to the left of the data grid is gold and greengraphic button called the Switch. Below the Switch is a set of three graphic buttons aligned vertically.

How it Works

The six graphic buttons from left to right function as below when clicked.

  1. Displays a dialog to open a data set file or create a new one
  2. Automatically creates a browse/edit program from the default table
  3. Gets information for the default table into Command Windows described below.
  4. Export data from the default table to a .csv file.
  5. Check database integrity.
  6. Compacts the current database.

When a database file is selected from the Data Sets box two things happen:

  • The information boxes to the left are filled with relevant information.
  • The database file is set as the default database
  • The data tree described below is filled with the database structure.

    When a table is selected from the Recordsets box the Data Grid is filled with table records. Select a record in the Data Grid and right-click to insert delimited record data into the Command Window. The 3 graphic buttons below the Switch, from top to bottom, function as below when clicked.

    1. Explores application folder with Windows Explorer
    2. Displays a DOS box
    3. Runs Windows Notepad.

    Switch button

    The Switch button changes the view of the program when clicked. Clicking it toggles the view from the data grid to a Command Window as shown in the image below.

    The Command Window is a platform for executing SQL queries as well as commands and functions.It is also a place where the results from queries and command strings can be displayed. The 3 graphic buttons top right of the box function as below when clicked. From top to bottom:

    1. Executes box contents which may be multi-line containing TCB comand strings, and combination of TCB functions, Windows commands, or scripts.
    2. Run XQL query in the box. Full, multi-line SQLite queries, including "dot" commands, can be entered in the CommandWindow and run.
    3. Clears the Command Window

    When the Switch button is right-clicked a Data Tree windows appears as shown in the image below.

    It has a row of three buttons top right of the tree. This object can display database structures as well as structures from TCB diagram files. When a table is selected and then right-clicked in the data tree, that table is loaded into the data grid. If the structure consists of a document tree then the document is displayed when right-clicked. The three graphic buttons from right to left function as below when clicked.

    1. Display dialog to open a data base file motiff says in .\data.
    2. Display dialog to load data tree file motiff says in .\diagrams.
    3. Clear the data tree

    zBrowser

    When a document is selected in the Data Tree and right-clicked, the requested document is sent to a TCB program, zbrowser.prc. zBrowser is a relatively new TCB program. It is located in the application folder because it is now a key program used by many other programs.

    zBrowser calling syntax is: tcb.exe zbrowser.prc ;[target file name]

    When invoked from a TCB program the tcb.exe is unneccessary since TCB programs are handled like any other executable. zBrowser now replaces the hard-coded xBrowser.exe that was TCB's default document browser since 2011. As with xBrowser, zBrowser reads both HTML and PDF documents. This is how zBrowser appears after loading as shown in the image below.

    click to enlarge

    The version of zBrowser in this distribution is slightly modified from the original. When the IDE button, described in the Motif section, is right-clicked it will open the document being viewed in Notepad for editing.
































    go to top

    TCB Distribution Programs Motif

    Most TCB program windows have a familiar pattern, a specific look and feel. At the very top left of the window is a small gray square. We call it the prototyping button or "panic" button. To the right of that object is a label with the name of the program. At the top middle of the window is a label with the program title.

    Below the prototyping button is a column of two or more buttons, window control buttons. The buttons may display help, minimize the window, toggle the window to stay on top of other windows or not, lock the screen, or exit.

    All of the TCB programs are installed with expectation that the end user will change things. That is one reason for the prototyping button. Another development aid is the convention of the IDE (integrated development environmnet) button. If this button exists it is usualy located at thr far right top of the window. Clicking this button will cause the program to exit and re-run itself. Right-clicking the button displays the program file in Notepad for editing.

    Many programs employ a data grid for displaying and retrieving records from a database. The data grid displays the records in the contacts database. To edit a record shown in the data grid, usually select the record by clicking in the grid and then right-click to place the record in any editing boxes.

    Programs that use a database may have a Data control section. It usually consists of a set of buttons to scroll through the database and buttons to update, delete and create new records.

    Many programs will use a Where box that lets the user search for records based on the record contents. The Where box can also be a Work Space.

    The program window may display a copyright notice at the bottom of the Window and a function key legend.

    Application folder structure in this motif is:

    Note: folders have to available only if used by a program in the application.
































    Copyright © 1982-2015, Phoenix Information Systems/TM all rights reserved
    Contact: Fred Pierce, makpiya@aol.com, makpiya@gmail.com, 831.240.9969