Skip to main content
Documentation & User Guides | Fotoware

Configuring a database connection for metadata import and export

This topic explains how to configure a database connection using ODBC in FotoStation. Such a connection can be used for looking up text records a database for insertion into the metadata in the files in your archive and for writing metadata back to the database. It can also be used for importing text from a database for application to files in a certain folder.

Creating a database connection

Connecting FotoStation to a database is done in the program configuration. Access it by opening the File menu (FotoStation Pro menu on the Mac) and choosing Configuration, then expanding the Metadata node in the configuration tree and clicking on the Database connections node. If no connection has been made previously, FotoStation will suggest creating one.

A connection to an existing database is made by specifying a Data source name (DSN). Configuring a System DSN is beyond the scope if this manual, but it can be done in the Windows Control Panel, by opening Administrative Tools and choosing Data Sources (ODBC).

 

odbc_properties.jpg

Having named the connection in FotoStation and specified a DSN and username/password (if required), you can click on the Configure button to set up mapping between database and metadata fields.

Mapping database and metadata fields

 

field_mapping.jpg

The screenshot above shows the dialog that lets you set up mapping of database columns (to the left) to metadata fields (right). Doing his will allow a metadata editor in FotoStation to look up a certain database field and insert its contents in the associated text field. By mapping several columns to metadata fields, FotoStation can fill in associated fields from the same record automatically. In the example above the database contains a list of countries and associated country codes. By mapping these fields to the Country and Country Code metadata fields, as shown above, and making slight changes to a text editor, it is possible to look up either database field and fill in the associated field automatically.

If you want to be able to enter information in a field in the FotoStation text editor and write it back to the back to the database, you will have to specify a primary key. Select a field that is unique, for example one containing a running number.

To save the ODBC connection, click on OK and close the FotoStation configuration dialog altogether.