Database Tour Documentation Contents Index

Command Line Usage: BDE Utilities

Top Previous Next

This topic describes parameters of Database Tour command line, specific to BDE utilities. This type of command line can be used only in Database Tour Pro. It requires BDE installed.

Common rules for writing command lines are described here.

Before you start...

Advanced users can build the needed command line manually using the specification below. But if you are a beginner or just need to create a command line for simple operation, you can save your time using Database Tour command line builder. To generate a command line, choose 'Tools | Generate Command Line | BDE Utilities...' menu. In 'Generate Command Line' window, specify needed options and click OK. A new window will appear with the command line generated. Copy it, correct it if it is needed, and use in Database Tour calls from your own programs, .bat files etc.

Usage (specification):

Long (classic) format:
    dbtour.exe [/silent] </BDEUtils> [/minimize][/CloseWhenDone] [/CloseOnError] [/LogFile=LogFileName] [/AppendLog] [/UseParadoxPasswords=ParadoxPasswords] [/pack] [/RegenerateIndexes][/SetPassword=ParadoxTablePassword] [/PhysicallySortBy=FieldName] [/SortDescending] [/SortSensitive] [/RenameTo=NewTableName] [/DuplicateAs=TableCopyName] [/ChangeLangDriverTo=NewTableLanguageDriverName] [/DBInterface=bde] [/DBKind=DBKind] [/DBDriver=DBDriver] [/DBUserName=UserName] [/DBPassword=Password] [/DB=DBName] [/TableName=TableName]
     
Short format (parameters are excluded from the command line and included in the action file):
    dbtour.exe [/silent] [/ParamsFile=ActionFileName]

If the /BDEUtils is used in command line, the program will open a database, specified by /DB parameter, then open a table specified by /TableName parameter, and then will perform BDE-specific operations, specified by other parameters. Log will be written to a file, specified by /LogFile parameter.

Notes:

1. When multiple operations specified, they are executed in the following order: packing, regenerating indexes, sorting, renaming, changing language driver, specifying Paradox password, duplicating. If you need to perform the operations in another order, you should make several Database Tour Pro calls.

2. All operations, except duplicating tables, applicable only to local table types (Paradox, dBase, and sometimes text tables).

Examples:

1. Pack and physically sort a dBase table
dbtour.exe /BDEUtils /CloseWhenDone /CloseOnError /DB=c:\MyDBFFolder /TableName=customer.dbf /pack /PhysicallySortBy=CustNo

2. Pack, protect by password, and rename a Paradox table
dbtour.exe /BDEUtils /DB=MyAlias /TableName=order.db /pack /SetPassword=*REMOVE* /RenameTo=orders.db

3. The same as the previous one but using an action file
dbtour.exe "/ParamsFile=C:\My Portfolio\DBTourStartParameters.txt"

The contents of C:\My Portfolio\DBTourStartParameters.txt file should be like the following:

 

;action
/BDEUtils

;options

/pack
/SetPassword=*REMOVE*
/RenameTo=orders.db

;target definition
/DB=MyAlias
/TableName=order.db

Description of the options:

Option Description
/BDEUtils Tells the program to perform BDE utilities.
/silent This switch will run the program in "silent" mode, without any windows (except purchase reminder when the program is used without registration after the test period). When using /ParamsFile option, /silent switch must be outside parameters file. Attention! There are no overwrite or other prompts in this mode.
/ParamsFile Specifies the name of the action file, which contains command line parameters, one parameter per line. Lines with a semicolon at the beginning are ignored as comments. Blank lines are allowed. When using this option, there should not be other command line parameters in the command line except /silent switch. If the file name includes spaces, entire parameter must be enclosed in quotes. See example 3.
/DB Specifies name of target database (a database, in which BDE utilities must be performed). This can be a file name, folder name, ODBC DSN, or BDE alias name. If the name includes spaces, entire parameter must be enclosed in quotes. If the name is an ADO connection string with quotes inside, it is recommended to use the short format of command line (using the parameters file).
/DBInterface Specifies database interface (database engine) used to connect the target database. Possible values: BDE. If not specified, the program will use BDE.
/DBKind Specifies target database kind. Possible values: FOLDER, FILE, DSN. If not specified, the program will try to detect it automatically.

Instead of using this parameter, it is possible to use a prefix specifying the database kind (file, folder, DSN) in the /DB parameter. The prefix must be enclosed in arrow brackets <>. Possible values: <FILE>, <FOLDER>, <DSN>. It is recommended to enclose the entire parameter in quotes in such cases.

/DBDriver Specifies target database driver. Examples of possible values: ACCESS, DBASE, INTERBASE, FIREBIRD, ORACLE, SQL SERVER, etc. If not specified, the program will try to detect it automatically. If the driver name includes spaces, entire parameter must be enclosed in quotes.
/DBUserName Specifies user name for target database. If the user name includes spaces, entire parameter must be enclosed in quotes.
/DBPassword Specifies password for target database. If the password includes spaces, entire parameter must be enclosed in quotes.
/TableName Specifies a table name, for which BDE utilities must be performed. If the name includes spaces, entire parameter must be enclosed in quotes.
/CloseWhenDone Forces the program to close itself after successful execution. This option is ignored in "silent" mode where the program is closed automatically anyway.
/CloseOnError Forces the program to close itself when error occurs during execution. This option is ignored in "silent" mode where the program is closed automatically anyway.
/minimize Program starts in minimized mode. It is restored to normal mode on error or after ending execution (if /CloseWhenDone switch is not used). This option is ignored in "silent" mode where the program runs without any windows.
/UseParadoxPasswords Semicolon separated list of passwords for Paradox tables.
/LogFile Specifies the name of the file to write operation log. If the name includes spaces, entire parameter must be enclosed in quotes.
/AppendLog Specifies that log of the operations should be written from the end of the log file with saving the previous file content. If this switch is omitted, existing log file will be fully overwritten.
/pack Tells the program to pack Paradox or dBase table, specified by /TableName parameter.
/RegenerateIndexes Tells the program to regenerate indexes for Paradox or dBase table, specified by /TableName parameter.
/SetPassword Specifies a password, by which Paradox table, specified by /TableName parameter, must be protected.
/PhysicallySortBy Specifies field name, by which the program must physically sort Paradox or dBase table, specified by /TableName parameter. Indexed Paradox table cannot be physically resorted. If the field name contains spaces, entire parameter must be enclosed in quotes.
/SortDescending Specifies that the physical sorting, specified by /PhysicallySortBy parameter, must be done in descending order.
/SortSensitive Specifies that the physical sorting, specified by /PhysicallySortBy parameter, must be case sensitive.
/RenameTo Specifies new name for Paradox, dBase, or text table, specified by /TableName parameter. If the table name contains spaces, entire parameter must be enclosed in quotes.
/DuplicateAs Specifies a name for new copy of a table, specified by /TableName parameter. If the table is a local table (Paradox, dBase, FoxPro, or text), all family files are also duplicated. If the new table name contains spaces, entire parameter must be enclosed in quotes.
/ChangeLangDriverTo Specifies a new language driver for Paradox or dBase table, specified by /TableName parameter.