ODBC Viewer

<< Test Data Generator | IBExpert | Database Inside >>

The ODBC Viewer allows you to browse data from any ODBC source available on your PC and also import data from an ODBC source into an SQL script or directly into a Firebird/InterBase® database. (This feature is unfortunately not included in the free IBExpert Personal Edition.)

Setting up and testing the ODBC driver

If you need an ODBC driver, it can be downloaded from https://www.firebirdsql.org. Then use the Windows menu: Settings / System Control / Administration / Data Source and select fbodbc. This now allows you to access data from non-Firebird applications such as, for example, OpenOffice Base.

Using the IBExpert Tools menu item, ODBC Viewer, select the database from the selection of formats: dBASE or Excel files, or Microsoft Access databases, to load the database tables.

The ODBC Viewer toolbar offers the following options:

  1. Display the active database connection type
  2. Run [F9] - runs an SQL
  3. Export data
  4. Exports data to script/file
  5. Cursor type: here a choice is offered of Forward Only, Static, Key Set, Dynamic.

The navigational buttons and icons displayed on the tool bar running across the head of the table data are explained in detail under: Table Editor / Data Grid. The ODBC Viewer's right-click menu is also detailed in this chapter.

The IBExpert Blob Viewer/Editor is automatically opened by double-clicking on any blob field.

Double-click (or [Enter]) on a table in the list on the left, to view the data contents. The view type can be easily altered by clicking on the buttons at the bottom left: Grid View, Form View and there is even the possibility to print the data. More information regarding these options can be found in the IBExpert Tools menu item, SQL Editor / Results and Table Editor / Data.

You can even query the table contents:

and view, print or export the results.

Please refer to Print Data and Export Data for further information.

Export data into a script

The ODBC Viewer's Export functions are similar to that of the Table Editor's Export Data into Script. However, whereas the Table Editor offers the pages, Fields, Options and Additional, the ODBC Viewer offers the options to Export into script and Export into table, both offering Fields and Options pages.

Please refer to Export Data into Script for details of exporting tables and table data into a script.

Export data into a table

When exporting into a table, first select the target database for the export, and whether you wish to export into a new or existing table. When existing table is selected, the drop-down list on the right offers a list of all current tables in the selected database.

On the Fields page below, all field names and field types of the source table can be viewed on the left-hand side. All fields are marked as default for exporting. This can be manually altered if wished by clicking or using the space bar on the check boxes. On the right, IBExpert suggests Field Names and Field Types for the new target table. These can be simply overwritten if required.

The Options page offers the Commit after specified number of records option.

Further information regarding data and file import and export can be found in the following documentation articles:

back to top of page

Importing Excel files and spread sheets

In Excel it is possible to define a specific area (a whole table or just parts of the data contents) and give this marked area a name (in the upper left area):

This defined data can then be used as a table in the ODBC Viewer (our example has been defined in Excel as TBL):

Alternatively an Excel file which is connected via ODBC can be viewed by typing the query:

 select * from "sheet1$" 

where sheet1$ is the name of the spread sheet (visible on the tab at the bottom of the sheet). To view our example above:

The first line is used always used for the column names.

Please also refer to the IBEBlock documentation and IBEBlock examples for a range of further import and export options.

See also:
ODBC access
Example: ODBC access

back to top of page
<< Test Data Generator | IBExpert | Database Inside >>