OVERVIEW.............An overview of dCLIP's Support of RDD's
DBFNTX...............The .DBF/.NTX Default Driver
DBFNTXC..............The .DBF/.NTX Conditional Index Driver for Clipper 5.01
FLEXFILE-II..........The Variable-Length-Field driver for Clipper 5.2
DBFNDX...............The .DBF/.NDX Index Driver
DBFCDX...............The FoxPro (.DBF/.FPT/.CDX/.IDX) Compatible Driver
DBFCMX...............The Comix (.DBF/.DBT/.CMX/.PCB) Driver
DBFSIX...............The SuccessWare Extended Index Driver
DBFMDX...............The dBASE-IV compatable .DBF/.MDX Driver
DBPX.................The Clipper 5.2 Paradox Driver
PDX..................The BabelFish Paradox Driver
RQBRDD...............The Btrieve Driver ( RaSQL/B )
DELIM................The Text File Delimited with Characters Driver
SDF..................The System Data Format Driver
PRE-PROCESSOR........Using the dCLIP Pre-Processor with RDD's
APPENDING............Appending records from another database type
COPYING..............Copying records to another database type
IMPORTING............Importing records from another database type
MODIFY STRUCTURE.....Modifying the structure of another database type
CREATE DATABASE......Creating a database

OVERVIEW

An overview of dCLIP's Support of RDD's

Description:

Much of the functionality of the various driver systems
available for Clipper are included in the dot-prompt commands,
the ASSIST and BROWSE menus and the UTILITIES menus, however,
only the standard DBFNTX or DBFNTXC driver must be linked in to
utilize all the features of dCLIP.

The dCLIP command and menu system is designed to recognize
which drivers are available and offer the options supported by
those drivers automatically. For example, if you link in the
DBFSIX or DBFMDX driver, you will be given the option of
selecting or building TAGS. If you link in the DBFNTXC or
DBFSIX driver, you will be given the option of building
Conditional indexes.

The standard syntax for opening a database with any "linked-in"
data-driver is the following:

USE (xcDatabase) VIA (cRDD) [ALIAS (xcAlias)] [NEW] ;
[EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex list)] ]

The VIA (cRDD) clause defines the driver to use for accessing
the data table. If the VIA (cRDD) clause is not given, then
the Default RDD will be used. The default RDD at the start-up
of dCLIP is DBFNTX. The default RDD can be changed with the
SET RDD TO (cRDD) command from the dot- prompt or from a
menu-selection in the ASSIST menu.

After a database is opened, then the SET INDEX TO (xcIndex list)
command is used to open a set of index files. Only indexes
that conform to the specifications for driver being used can be
opened.

The command for creating index files will vary from driver to
driver. Some index drivers support conditional indexing, others
support combined indexes with TAGs, and others support
progress-bar odometers.

A command line that would support all the above features would
look like this:

INDEX ON (expKey) TAG (cTagName) [OF (xcCdxName)] [FOR ;
(lCondition)] [ ASCENDING)] [DESCENDING)] [UNIQUE] ;
[USECURRENT)] [OPTION (expUDF) ; [ STEP (nRecs) ] ]

Examples:

// Open MAILLIST.DBF/.FPT
. USE MAILLIST VIA 'DBFSIX'

// Create MAILLIST.CDX
. INDEX ON LAST_NAME TAG LAST OF MAILLIST FOR ZIP = '9' ;
OPTION ODOMETER()
. SET RDD TO DBFNDX // dBASE-III index support
. USE CUSTOMER // Open CUSTOMER.DBF
. INDEX ON CUST_NAME TO CUSTOMER // Create CUSTOMER.NDX
. SET RDD TO PDX // Paradox support
. USE CUST_BOR // Open CUST_BOR.DB

DBFNTX

The .DBF/.NTX Default Driver

Description:

The DBFNTX driver is the default database/index driver. If the
SET RDD command or the USE..VIA command are not used, then all
databases will be created with the .DBF extension and index
files will be created with the .NTX extension.

Index files created with the DBFNTX (Conditional) driver will
cause an "index file corrupted" error if you attempt to open
them with the DBFNTX driver.

Commands compatible with the DBFNTX driver are the following:

. USE (xcDatabase) [ VIA 'DBFNTX' ] [ALIAS (xcAlias)] [NEW] ;
[EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex list)] ]

. SET RDD TO DBFNTX

. SET INDEX TO (xcIndex list)

. INDEX ON (xExpression) TO (xcIndex)

DBFNTXC

The .DBF/.NTX Conditional Index Driver for Clipper 5.01

Description:

The DBFNTX (Conditional) driver is a Conditional indexing
driver that replaces the default DBFNTX driver included with
Clipper. This driver is referred to by the same name (DBFNTX)
as the default driver when using dCLIP commands, however for
the purpose of documentation, we will refer to it as the
DBFNTXC driver. If the SET RDD command or the USE..VIA command
are not used, then all databases will be created with the .DBF
extension and index files will be created with the .NTX
extension. NOTE: This driver is available for Clipper 5.01
only. The standard DBFNTX driver included with Clipper 5.2
basically includes this same functionality.

Index files created with the default DBFNTX driver are
compatible with the DBFNTXC driver.

When indexing or reindexing with the DBFNTXC driver, dCLIP will
install an Odometer to show indexing progress.

Commands compatible with the DBFNTXC driver are the following:

. USE (xcDatabase) [ VIA 'DBFNTX' ] [ALIAS (xcAlias)] [NEW] ;
[EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex list)] ]

. SET RDD TO DBFNTX

. SET INDEX TO (xcIndex list)

. INDEX ON (xKey) TO (xcIndex) [FOR (lCondition)] [ ALL] ;
[WHILE (lCondition)] [NEXT (nRecords)] [RECORD (nRecord)] ;
[REST] [EVAL (bBlock)] [EVERY (nRecords)] [UNIQUE] [ASCENDING];
[DESCENDING]

FLEXFILE-II

The Variable-Length-Field driver for Clipper 5.2

Description:

The FLEXFILE-II is a very focused tool kit for CA-Clipper
programmers. Its first and main purpose is to provide a
complete replacment for Clipper's memo-fields with a more
powerful and more efficient Variable Length Field engine.

FlexFile extends Clipper's memo-fields by allowing any
valid data type (except code-blocks) to be store in a
memo field. This include multi-dimensional arrays or
objects.

FlexFile replaces the .DBT memo file with a special type
of file with a .DBV extension. Flexfile also "inherits"
any other driver so you can use its .DBV features along
with the special index features of another driver.
This is accomplished by setting the "Super RDD" via the
V_SUPERRDD() function or the SET SUPERRDD command.

Commands compatabile with FlexFile-II:

. SET RDD TO FLEXFILE

. SET SUPERRDD TO (rdd)


DBFNDX

The .DBF/.NDX Index Driver

Description:

The DBFNDX driver is the dBASE-III compatible database/index
driver. If the SET RDD TO DBFNDX command or the USE..VIA
'DBFNDX' command are used, then databases will be created with
the .DBF extension and index files will be created with the
.NDX extension.

Index files created with the DBFNDX driver are compatible with
dBASE-III but may NOT be used concurrently with dBASE-III
applications because the record-locking scheme is not
compatible with dBASE-III plus.

Commands compatible with the DBFNDX driver are the following:

. USE (xcDatabase) [ VIA 'DBFNDX' ] [ALIAS (xcAlias)] [NEW] ;
[EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex list)] ]

. SET RDD TO DBFNDX

. SET INDEX TO (xcIndex list)

. INDEX ON (xExpression) TO (xcIndex)


NOTE:
When creating .NDX indexes, make sure that you use key
expressions that use only dBASE-III compatible functions or
they will not operate under dBASE-III or dBASE-IV.

DBFCDX

The FoxPro (.DBF/.FPT/.CDX/.IDX) Compatible Driver

Description:

The DBFCDX driver is an index driver that supports FoxPro /
FoxBase compatible database/index files. This driver is
basically a "subset" of the DBFSIX driver from SuccessWare,
Inc. so it will function nearly identically.

The DBFCDX driver allows up to 99 tags in a combined index.
This means you can have 99 separate keys in a single index
file. The index keys are referred to by "TAG NAME". All of
the commands supported by the DBFCDX driver are built-in to
dCLIP so an #include file is not needed. All of the
functionality of the DBFCDX driver system is also included in
the ASSIST and BROWSE menus, however, the DBFCDX driver does
not need to be linked in to utilize all the features of dCLIP.

The DBFCDX driver also supports only .FPT-style memos.

The dCLIP command and menu system is designed to recognize
which drivers are available and offer those options
automatically.

When indexing or reindexing with the DBFCDX driver, dCLIP will
install an Odometer to show indexing progress.

Commands compatible with the DBFCDX driver are as follows:

. USE (xcDatabase) [ VIA 'DBFCDX' | FOX ] [ALIAS (xcAlias)] ;
[NEW] [EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex
list)] ]

. SET RDD TO DBFCDX

. SET INDEX TO (xcIndex list)

. SET ORDER TO TAG (cTagName) [OF (xcCombinedIndex)]

. SET TAG [TO (cTagName) [OF ((cCombinedIndex)]]

. INDEX ON (xKey) [TAG (cTagName)] [TO (xcCombinedIndex)] ;
[FOR (lCondition)] [ALL] [ASCENDING] [DESCENDING] [UNIQUE] ;
[EVAL (cUdf) [EVERY (nRecords)]] [USECURRENT] [ADDITIVE] ;
[RECORD (nRecord)] [REST] [WHILE (lWhile)] [NEXT (nRecords)]

. REINDEX [EVAL (cUdf) [EVERY (nRecords)]]

. DELETE TAG ((cTagName)) [OF (xcCombinedIndex)]

. DELETE TAG ALL [OF (xcCombinedIndex)]

. SORT [TO (xcFile)] [ON (fields,...)] [FOR (lCondition] ;
[WHILE (lCondition)] [NEXT (nRecords)] [RECORD (nRecord)] ;
[REST] [ALL]

DBFCMX

The Comix (.DBF/.DBT/.CMX/.PCB) Driver

Description:

The DBFCMX driver is an index driver from LodeStone, Inc.
that supports .DBF/.DBT database files and a proprietary
index structure for both combined (production) indexes and
single indexes.

The DBFCMX driver allows up to 99 tags in a combined index.
This means you can have 99 separate keys in a single index
file. The index keys are referred to by "TAG NAME". All of
the commands supported by the DBFCMX driver are built-in to
dCLIP so an #include file is not needed. All of the
functionality of the DBFCMX driver system is also included in
the ASSIST and BROWSE menus, however, the DBFCMX driver does
not need to be linked in to utilize all the features of dCLIP.

The dCLIP command and menu system is designed to recognize
which drivers are available and offer those options
automatically.

When indexing or reindexing with the DBFCMX driver, dCLIP will
install an Odometer to show indexing progress.

Commands compatible with the DBFCMX driver are as follows:

. USE (xcDatabase) VIA DBFCMX [ALIAS (xcAlias)] ;
[NEW] [EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex
list)] ]

. SET RDD TO DBFCMX

. SET INDEX TO (xcIndex list)

. SET ORDER TO [TAG (cTagName)]

. SET TAG [TO (cTagName)]

. INDEX ON (xKey) [TAG (cTagName)] [TO (xcCombinedIndex)] ;
[FOR (lCondition)] [ALL] [ASCENDING] [UNIQUE] ;
[EVAL (cUdf) [EVERY (nRecords)]] [USECURRENT] [ADDITIVE] ;
[WHILE (lWhile)]

. REINDEX [EVAL (cUdf) [EVERY (nRecords)]]

. DELETE TAG (cTag1), [(cTagn)]

. DELETE TAG ALL [OF (xcCombinedIndex)]

. SET SCOPE TO [(value)]

. SET SCOPETOP TO [(value)]

. SET SCOPEBOTTOM TO [(value)]

. SORT [TO (xcFile)] [ON (fields,...)] [FOR (lCondition] ;
[WHILE (lCondition)] [NEXT (nRecords)] [RECORD (nRecord)] ;
[REST] [ALL]

DBFSIX

The SuccessWare Extended Index Driver

Description:

The DBFSIX driver (from SuccessWare, Inc.) is an "extended"
index driver that supports FoxPro / FoxBase compatible
database/index files and offers other significant advantages.

The DBFSIX driver allows up to 99 tags in a combined index.
This means you can have 99 separate keys in a single index
file. The index keys are referred to by "TAG NAME". All of
the commands supported by the DBFSIX driver are built-in to
dCLIP so an #include file is not needed. Much of the
functionality of the DBFSIX driver system is also included in
the ASSIST and BROWSE menus, however, the DBFSIX driver does
not need to be linked in to utilize all the features of dCLIP.

The dCLIP command and menu system is designed to recognize
which drivers are available and offer those options
automatically.

When indexing or reindexing with the DBFSIX driver, dCLIP will
install an Odometer to show indexing progress.

Commands compatible with the DBFSIX driver are as follows:

. USE (xcDatabase) [ VIA 'DBFSIX' | FOX ] [ALIAS (xcAlias)] ;
[NEW] [EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex ;
list)] ]

. SET RDD TO DBFSIX

. SET INDEX TO (xcIndex list)

. SET ORDER TO TAG (cTagName) [OF (xcCombinedIndex)]

. SET TAG TO (cTagName) [OF ((cCombinedIndex)]

. SET TAG TO

. INDEX ON (xKey) TO (xcIndex) [FOR (lCondition)] [ASCENDING] ;
[DESCENDING] [UNIQUE] [EMPTY] [USECURRENT] [OPTION (cUdf) ;
[STEP (nRecords)]]

. INDEX ON (xKey) TAG (cTagName) [OF (xcCombinedIndex)] ;
[FOR (lCondition)] [ASCENDING] [DESCENDING] [UNIQUE] [EMPTY] ;
[USECURRENT] [OPTION (cUdf) [STEP (nRecords)]]

. REINDEX [OPTION (cUdf) [STEP (nRecords)]]

. DELETE TAG ((cTagName)) [OF (xcCombinedIndex)]

. DELETE TAG ALL [OF (xcCombinedIndex)]

. SET SCOPETOP TO [(value)]

. SET SCOPEBOTTOM TO [(value)]

. SET SCOPE TO (value)

. CLEAR SCOPE

. SET DIRTYREAD ON

. SET DIRTYREAD OFF

. SET MEMOBLOCK TO (value)

. SORT [TO (xcFile)] [ON (fields,...)] [FOR (lCondition] ;
[WHILE (lCondition)] [NEXT (nRecords)] [RECORD (nRecord)] ;
[REST] [ALL] [USECURRENT]

DBFMDX

The dBASE-IV compatable .DBF/.MDX Driver

Description:

The DBFMDX driver is an index driver that supports dBASE-IV
compatible database/index files. This driver is shipped with
"Matt Whelan's dBASE-IV Compiler Kit" and it functions
similarly to the DBFFOX driver.

The DBFMDX driver allows up to 99 tags in a combined index.
This means you can have 99 separate keys in a single index
file. The index keys are referred to by "TAG NAME". All of
the commands supported by the DBFMDX driver are built-in to
dCLIP so an #include file is not needed. All of the
functionality of the DBFMDX driver system is also included in
the ASSIST and BROWSE menus, however, the DBFMDX driver does
not need to be linked in to utilize all the features of dCLIP.

The dCLIP command and menu system is designed to recognize
which drivers are available and offer those options
automatically.

When indexing or reindexing with the DBFMDX driver, dCLIP will
install an Odometer to show indexing progress.

Commands compatible with the DBFMDX driver are as follows:

. USE (xcDatabase) [ VIA 'DBFMDX' | DB4 ] [ALIAS (xcAlias)] ;
[NEW] [EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex ;
list)] ]

. SET RDD TO DBFMDX

. SET INDEX TO (xcIndex list)

. SET ORDER TO TAG (cTagName) [OF (xcCombinedIndex)]

. SET TAG TO (cTagName) [OF ((cCombinedIndex)]

. SET TAG TO

. INDEX ON (xKey) TO (xcIndex) [FOR (lCondition)] [ASCENDING] ;
[DESCENDING] [UNIQUE] [EMPTY] [OPTION (cUdf) [STEP ;
(nRecords)]]

. INDEX ON (xKey) TAG (cTagName) [OF (xcCombinedIndex)] ;
[FOR (lCondition)] [ASCENDING] [DESCENDING] [UNIQUE] ;
[OPTION (cUdf) [STEP (nRecords)]]

. REINDEX [OPTION (cUdf) [STEP (nRecords)]]

. DELETE TAG ((cTagName)) [OF (xcCombinedIndex)]

. DELETE TAG ALL [OF (xcCombinedIndex)]

. SORT [TO (xcFile)] [ON (fields,...)] [FOR (lCondition] ;
[WHILE (lCondition)] [NEXT (nRecords)] [RECORD (nRecord)] ;
[REST] [ALL]

DBPX

The Clipper 5.2 Paradox Driver

Description:

The DBPX driver is compatible with Borland databases for
Paradox and ObjectVision.

If the SET RDD TO DBPX command or the USE..VIA DBPX command are
used, then databases will be created with the .DB extension and
index files will be created with the .PX extension.

Although the Paradox file system is a record-based system, it
behaves differently when performing database operations than
what you may be accustomed to with .DBF files. For example,
all index keys are UNIQUE, so if you add a new record to a
database with a duplicate key it will not be added but instead
will be placed in a KEYVIOL.DB database.

When you delete a record, it is immediately deleted, so be
careful when using the DELETE command because deleted records
CANNOT be RECALLed.

When you change the data in a field that is part of the index
key, the record order will automatically change to match the
order of the key, so the RECNO() function may not always report
the results you expect.

Using Parodox files on a network requires that you run SHARE on
your workstation PC or file / record locking will not be
supported.

Commands compatible with the PDX driver are the following:

. USE (xcDatabase) VIA DBPX [ALIAS (xcAlias)]
[NEW] [EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex ;
list)] ]

. SET RDD TO DBPX

. SET INDEX TO (xcIndex list)

. INDEX ON (xExpression) [ TO (xcIndex) ]

PDX

The BabelFish Paradox Driver

Description:

The PDX driver (also referred to as the BabelFish driver) is
compatible with Borland databases for Paradox and ObjectVision.

If the SET RDD TO PDX command or the USE..VIA 'PDX' command are
used, then databases will be created with the .DB extension and
index files will be created with the .PX extension.

Although the Paradox file system is a record-based system, it
behaves differently when performing database operations than
what you may be accustomed to with .DBF files. For example,
all index keys are UNIQUE, so if you add a new record to a
database with a duplicate key it will not be added but instead
will be placed in a KEYVIOL.DB database.

When you delete a record, it is immediately deleted, so be
careful when using the DELETE command because deleted records
CANNOT be RECALLed.

When you change the data in a field that is part of the index
key, the record order will automatically change to match the
order of the key, so the RECNO() function may not always report
the results you expect.

Using Parodox files on a network requires that you run SHARE on
your workstation PC or file / record locking will not be
supported.

Commands compatible with the PDX driver are the following:

. USE (xcDatabase) [ VIA 'PDX' | PARADOX ] [ALIAS (xcAlias)]
[NEW] [EXCLUSIVE] [SHARED] [READONLY] [INDEX (xcIndex ;
list)] ]

. SET RDD TO PDX

. SET INDEX TO (xcIndex list)

. INDEX ON (xExpression) [ TO (xcIndex) ]

RQBRDD

The Btrieve Driver ( RaSQL/B )

Description:

The RQBRDD driver (from Communication Horizons, Inc.) is a
Btrieve database driver that supports Netware SQL files.

Commands for the RQBRDD driver are not part of the built-in
command set but may be loaded into the pre-processor array by
using the dot-prompt command:

. INCLUDE RQB.CH

or may be linked into the engine by including the dCLIPRQB.OBJ
file and "activating" the command set with #INCLUDE=RQB.OBJ in
your DCLIP.SYS file.

Commands compatible with the RQBRDD driver are as follows:

SET RDD TO [(cRdd)]

SET DEFAULT RDD TO [(cRdd)]

SET DEFAULT FILETYPE TO [(filetype)]

SET MEMOWIDTH TO (nWidth)

SET DELETESKIP ON | OFF | (xValue) USE (xcDatabase) [VIA ;
(cRdd)] [DEFINITION (def)] [ALIAS (a)] [NEW] [EXCLUSIVE] ;
[SHARED] [READONLY] [INDEX (xcIndex1) [,(xcIndexn)]]

APPEND [FROM (xcFileName)] [DEFINITION (def)] [FIELDS ;
(fields,...)] [FOR (for)] [WHILE (while)] [NEXT (next)] ;
[RECORD (rec)] [REST] [ALL]

SET ERRORLEVEL TO (nErrorLevel)

CLEAR BUFFER

DROP INDEX (n)

SET SAFETY ON | OFF | (xValue)

SET HARDWRITE ON | OFF | (xValue)

SET VISIBLE ON | OFF | (xValue)

INDEX ON (key) [UNIQUE]

DELIM

The Text File Delimited with Characters Driver

Description:

The DELIM driver is supported only as a means to import and
export data to other drivers. DO NOT attempt to use the DELIM
driver as you would any other RDD or you will get a runtime
error because many of the standard RDD functions are not
supported. For example, the RECNO() function will cause a "not
supported" error. The DELIM driver will import data from an
ASCII file where fields are sepearated by commas and character
fields are enclosed in double quote marks (the default
delimiter) or any delimiter specified. Fields and records are
variable length and end with a carriage return and line feed.
The end-of-file mark is Ctrl-Z (1A hex).

The following commands are used with the DELIM driver:

. APPEND FROM (xcFile) DELIMITED [ WITH BLANK | (xcDelimiter) ]]


. COPY [FIELDS (idFieldlist)] TO (xcFile) [FOR (lCondition)] ;
[WHILE (lCondition)] [NEXT (recs)] [RECORD (rec)] [REST] [ALL] ;
DELIMITED [ WITH BLANK | (xcDelimiter) ] ]

SDF

The System Data Format Driver

Description:

The SDF driver is supported only as a means to import and
export data to other drivers. DO NOT attempt to use the SDF
driver as you would any other RDD or you will get a runtime
error because many of the standard RDD functions are not
supported. For example, the RECNO() function will cause a "not
supported" error. The SDF driver will import data from a
System Data Format ASCII file. Each record is a fixed length
ending with a carriage return/line feed. The end-of-file mark
is Ctrl-Z (1A hex).

The following commands are used with the SDF driver:

. APPEND FROM (xcFile) SDF

. COPY [FIELDS (idFieldlist)] TO (xcFile) [FOR (lCondition)];
[WHILE (lCondition)] [NEXT (recs)] [RECORD (rec)] [REST] [ALL] ;
SDF

PRE-PROCESSOR

Using the dCLIP Pre-Processor with RDD's

Description:

It is not necessary to understand the built-in pre-processor in
dCLIP when using most RDD's because the default commands which
support the popular RDD's are already included in the built-in
command set. If you are testing a new RDD system, wish to
modify commands, or wish to add commands with a different
syntax than the default commands, then it is recommended that
you familiarize yourself with the dCLIP pre-processor.

In a nut-shell, the dCLIP pre-processor is compatible with the
pre- processor built into Clipper.exe. dCLIP does not execute
commands, only functions, therefore all commands entered at the
dot-prompt are passed through the pre-processor to attain an
array of executable functions.

You must build your #include files using #command or #translate
directives following the directions in the Clipper Guides. To
use RDD's that are not automatically supported by dCLIP do the
following:

1. Create and compile an EXTERNAL.PRG file with EXTERNAL
declarations for the RDD functions you want to incorporate
into dCLIP3.EXE.

2. Add your RDD library and EXTERNAL.OBJ to the DCLIP3.LNK link
script file and build the dCLIP3.EXE with Blinker:

BLINKER @DCLIP3.LNK

3. Start-up dCLIP3.exe and load your #include file with your
command set:

. INCLUDE (cMyCommandFile)

You are now ready to use any database driver system with dCLIP.

See Also:

INCLUDE

APPENDING

Appending records from another database type

Description:

Records may be appended from a database to an open work area,
even though the data bases may use different drivers. For
example, records from a Paradox file can be appended to a .DBF
database, however, only fields with the same name will be
appended. If the database has an entirely different structure,
it is recommend that you use the IMPORTing commands.

Appending between different drivers requires that you:

1. Open the TARGET database with the VIA clause.
Example : . USE MAILLIST VIA 'DBFSIX'

2. Select the RDD for the database type to append FROM.
Example : . SET RDD TO PDX

3. Use the APPEND command to append the records.
Example : . APPEND FROM CUST_BOR FOR DATE = DATE()

See Also:

APPEND

COPYING

Copying records to another database type

Description:

Records may be copied from a work area to a new database, even
though the data bases may use different drivers. For example,
records from a Paradox file can be copied to a .DBF database.

Copying between different drivers requires that you:

1. Open the TARGET database with the VIA clause.
Example : . USE MAILLIST VIA 'PDX'

2. Select the RDD for the type of database you wish to create.
Example : . SET RDD TO DBFNTX

3. Use the COPY command to create the new database.
Example : . COPY TO MAIL_714 FOR PHONE_AREA = '714'

More examples:

Let's say you have a database named CUSTOMER with several memo
fields. This database was originally created using the default
DBFNTX driver so the files will have the names CUSTOMER.DBF
and CUSTOMER.DBT. Now you wish to create a new database that
is FoxPro compatible from the original data. The new file
names will be CUSTFOX.DBF and CUSTFOX.FPT. The .FPT memo file
structure is an improvement over the .DBT structure in that
.FPT files are usually much smaller than .DBT files.

You would create the new files as follows:

. USE CUSTOMER VIA 'DBFNTX'
. SET RDD TO 'DBFSIX'
. COPY TO CUSTFOX

See Also:

COPY
dc_copy

IMPORTING

Importing records from another database type

Description:

Importing records from a database of a different structure is
accomplished by use of the IMPORT commands or functions.
Importing requires that you first create a "Field Map" to
define how information from one database will map to another
database. Once a field map has been created, it can be used
over and over again, because it is save to a file with the
extension .DCF.

Creating a field map is quite simple. First you must open both
databases with the appropriate driver, then use the IMPORT
CREATE command from the dot prompt. Two field-lists and a menu
will appear on the screen to allow you to match fields. You
can "extract" information from the imported database and import
it into more than one field in the target database, or you can
"concatenate" two or more fields from the import database into
the target database. After you are completed matching fields,
the "Field Map" is then saved for use with the BROWSE system or
the IMPORT command.

The BROWSE system let's you selectively move records from one
work area to another via the Field Map.

The IMPORT command let's you selectively append records from
one work area to another via the SCOPING clauses.

Example:

. USE MAILLIST VIA 'DBFSIX'
. USE TRANSACT NEW VIA 'PDX'
. IMPORT CREATE NEWMAIL FROM TRANSACT TO MAILLIST
. SELECT MAILLIST
. IMPORT FROM TRANSACT MAP NEWMAIL FOR NEW_TRANS
. SELECT TRANSACT
. REPL ALL NEW_TRANS WITH .F.

See Also:

IMPORT
dc_import()

MODIFY STRUCTURE

Modifying the structure of another database type

Description:

When a database has been opened via a specialized driver, you
can modify the structure of the database with the MODIFY
STRUCTURE command. A set of backup files named BAK_DATA.* will
be created with the same extensions as the original files. You
can add, delete, move, re-size, or change the type of any
field. Data will be restored from the original file, the type
of the new database will be of the same type, the original
name(s) will be restored and the database will be re-opened
using the same RDD.

See Also:

MODIFY STRUCTURE
dc_modstru()

CREATE DATABASE

Creating a database

Description:

Creating a new database requires that you first select the
driver that will support the file structure desired.

The CREATE command will give you a menu for adding the new
fields to the database.

Example:

. SET RDD TO DBFSIX
. CREATE NEWFILE1 // Create NEWFILE.DBF/.FPT
. INDEX ON LAST TO LASTNAME // Create LASTNAME.IDX
. SET RDD TO DBFNTX
. CREATE NEWFILE2 // Build NEWFILE.DBF/.DBT
. INDEX ON LAST TO LASTNAME // Create LASTNAME.NTX
. SET RDD TO PDX
. CREATE NEWFILE3 // Build NEWFILE.DB
. INDEX ON LAST TO LASTNAME // Create LASTNAME.PX

See Also:

CREATE
dc_create()