Sfairadora

  • Reference Guide

Import from Database

This tool allows you to import data from relational databases using the standard ODBC or OLE DB interface. You can import data from those database sources for which you have the appropriate ODBC or OLE DB driver installed in Windows.
These interfaces regard relational databases as sets of tables, in which every table is defined by a set of columns. When you import data, you must first select the interface through which data would be imported, then the database driver (i.e. type), and then the particular database accessible by the driver. When you have selected the database, open it with the Open Database button. A list of tables included in the database appears together with the list of columns for every table. You can either select tables and columns you wish to import or enter an SQL command. If the latter is the case, data returned by the query are imported. The imported data is saved to the Data section of the target document. Since multiple tables can be imported at once, you can specify that the new item in the Data section be a structure comprising the imported tables.

Opening Database

Item
Description
Data access method
Determines the communication method with the source database:
ODBC data source data is accessed through ODBC; data is acquired from a data source defined in your computer.
ODBC file
ODBC is used to access data in any file.
OLE DB
data is accessed through OLE DB.
For ODBC data sources:
Data source name
Name of an ODBC data source defined in Windows. Data sources in Windows are administered by the Data Sources (ODBC) utility located either directly in the Control Panel (in older versions of Windows) or in the Administrative Tools subsection of the Control Panel.
For ODBC file:
Driver
Name of the data source driver. Every file type has its specific driver. You must select from the list the appropriate driver for the file you wish to open.
Database qualifier (DBQ)
Database qualifier. This is usually a name of a file or folder. Exact interpretation depends on the data source driver. The value corresponds to the DBQ parameter of the ODBC connection string.
Database
Some data sources may contain multiple databases depending on the file type.
For OLE DB:
Provider
Select the data provider from the list. One provider is available for each installed database type.
Data source
Data source. This is usually the name of the file or folder on a disk where the database is saved by the provider.
Database qualifier (DBQ)
Database qualifier. This is usually a name of a file or folder. Exact interpretation depends on the data source driver. The value corresponds to the DBQ parameter of the OLE DB connection string.
Database
If the data source contains more than one database, you can select which one should be opened.
Other
Server
If you are connecting to a remote database via network, enter the name of the server where the database is located.
User name
User name for accessing the database if required.
Password
Password assigned to the user name.
Other parameters
Other parameters that are directly added to the connection string.
Connection string
The connection string composed of the above parameters is displayed here for information. The string is used to open the database through ODBC or OLE DB.
Open Database
Click this button to open the database. The database must be open before you can start importing the data.
Close Database
You should use this button to close the database when you are finished with the data import.

Database

When you have opened a database, the following subsection appears in the window. It contains information about the structure of the selected database. Here you can specify import parameters and execute the data import.
Item
Description
Tables
List of all tables in the database. There is a check box to the left of every table name. Only checked tables are imported.
You will see a Read column list button to the right of every table name. When you click it, a list of the respective table columns is loaded and displayed in place of the button. Every column has a check box on the left as well. Only checked columns are included for import.
Note: If you select the Execute SQL command operation, the selection of tables and columns is insignificant.
Select all tables
When you click this button, all tables are included for import.
Unselect all tables
When you click this button, all tables are excluded from import.
Operation
Operation that should execute the import:
Import selected tables
Execute SQL command
For the operation Import selected tables:
Import target
You can specify the target destination for the imported tables:
Section Data
all imported tables will be stored as new tables in the Data section of the target document.
Structure in section Data
a new structure will be created in the Data section of the target document; the imported tables will be stored in this structure.
Name of structure
If the import target is set to Structure in section Data, this field identifies the name of the structure in which the tables will be stored. The name must be an identifier.
Import Data
Import is executed by clicking this button.
For the operation Execute SQL command:
SQL command
The SQL command that should be executed on the opened database.
Command result
What should be done with the command result:
Discard result
The SQL command can be executed without importing any data.
Store result as a table in section Data
The result of the command evaluation will be stored as a table in the Data section of the target document.
Table name
If the command result is to be stored, this field identifies the name of the table in which the data will be stored. The name must be an identifier.
Execute SQL command
When you click this button, the SQL command is executed, and the resulting data is stored in the document if applicable.