Exporter - Database

The screen shown in Fig 1 is where you define the options for exporting data to a database.

 

Fig 1

Fig 1

 

Database Connection

Select a database connection, you can click the add/edit button to manage database connections, see Database Connections.

 

Sage Data

Choose Sage Table(s) you want to export.

 

Database Table

For each Sage Table being exported you need to select a table from your database, this is where the data will be exported to.

 

Fields

Used to map Sage fields to your database fields, See section on Fields below for more details.

 

Options

See section on Options below.

 

Filter/Preview

Used to preview the export data and also to define optional filters controlling precisely the data exported.

 

Relationships

Used to define relations between sage tables, see Relational Data

 

 

 

Fields


Clicking the Fields button on each of the Sage tables being exported will bring up the screen shown in Fig 2, it comprises of a grid containing a collection of field mappings, each row represents a single field mapping used to map a Sage field to one of your database fields. new rows can be added using the blank row at the bottom of the grid.

 

Fig 2

Fig 2

 

Database Field

Select a database field from your database.

 

Sage Field

Select a Sage field you wish your database field mapped to.

 

Fixed Value

A value you can specify to override the exported value, used in conjunction with the Fixed Value Mode selection.

 

Fixed Value Mode

Use this to specify when to use the Fixed Value, you can force use of this value always or only when the original export value is empty.

 

Auto Map

If you have named the fields in your database table to match the associated Sage field you can click this button to scan your database table for field names matching the Sage tables fields, any matching fields will be auto mapped.

 

 

 

Options


Clicking the Options button on each of the Sage tables being exported will bring up the screen shown in Fig 3, it allows you to specify various options to apply to your exports.

 

Fig 3

Fig 3

 

Export Updated Data Only

you can export only data from sage that has been changed since the last time it was exported, see Export Updated Data Only.

 

Database Update Mode

This is used to control precisely how your database is updated, the options you can choose from are:

 

Insert And Update
This is the default option, exported records not already in the database are inserted, existing records are updated, no records are ever deleted.
 

Insert Only
exported records not already in the database are inserted, existing records are not updated, no records are ever deleted.
 

Update Only
records already in the database are updated, no new records are inserted, no records are ever deleted.
 

Clear And Fill
All records in the database table are deleted prior to inserting all exported records.

 

Exporter determines if a record already exist in your database table using the settings you define under the Existing Records section below.

 

Existing Records

Choose which fields must match when searching the target database, a record in your database must have all checked fields match field values with the exported Sage record in order to be considered a match, by default the primary key field (if the Sage table has one) will be the only selected field.