|
<PREV NEXT>
SQL Exporting to SQL Databases
Alpha Five can now export data form local .dbf tables to
remote SQL databases. When you create a new Export operation, a new dialog is
displayed from which you can choose to standard export (say, to a text file) or
an AlphaDAO Export to a Remote Database.
If you select the 'Remote database using AlphaDAO' option
then the AlphaDAO Export builder is shown. The first step is to specify the
connection string to the remote database to which you want to export tables.
After you have connected to the remote database, the
builder looks like this:
 This image has been scaled to fit on this page. Click for fullsize image
You can select one or more tables to export. For
each table that you select to export you can define the following
properties:
- Name of the table to create in the remote database.
- List of fields to export. If you leave this blank all fields are
exported. You can specify a list of fields and also expressions. For example,
you might want to export 'alltrim(firstname) + " " + lastname' as a single
field rather than exporting 'firstname' and 'lastname' as two separate fields.
- Filter expression to select which records to export. The filter
expression can include arguments. For example: city = :whatcity. If you use
arguments in your filter, you must define the arguments by clicking the smart
field in the 'Arguments' property. Alpha Five will prompt for argument values
at runtime.
- Order expression to define the order in which the records should be
exported.
- Query flags to control how the filter is executed (these are the
standard query flags for the <tbl>.query_create() method).
- CREATE TABLE statement that should be used to create the remote table
into which the exported records will be placed. In most cases you will not set
this property - Alpha Five will create a default CREATE TABLE statement. By
defining your own CREATE TABLE statement, you can control the data type of
each column in the exported table.
- Whether
existing tables of the same name in the remote database should be dropped
before tables are exported. You can select Yes, No or Prompt.
Watch Video
|