This topic describes parameters of Database Tour command line, specific to batch operations with data from text fields. This type of command line can be used only in Database Tour Pro.

More information about operations with data from text fields can be found here.

Common rules for writing command lines are described here.

Building Command Line in a Few Clicks

Usage

Command line options and their descriptions

Examples

Building Command Line in a Few Clicks

Advanced users can build the needed command line manually using the specification below.

But if you are a beginner or need to create a command line or action file without learning the details, use the Database Tour Command Line Builder.

Usage

Classic command line format

The command line consists of all needed switches and parameters:

dbtour.exe /Parameter1 /Parameter2 /... /ParameterN

Short command line format

This format is more flexible as it allows you to keep all command line parameters in a separate action file. The command line consists of the /ActionFile parameter (which points to the action file path) and an optional /silent parameter:

dbtour.exe [/silent] /ActionFile=ActionFileName

Command line options and their descriptions

/TextUtils

Tells the application to perform batch operations with text fields. Required parameter for this command line type.

/silent

This switch will run the application in silent mode, without any windows (except purchase reminder when the application is used without registration after the end of the test period). When using /ActionFile option, /silent switch must be outside parameters file. Attention! There are no overwrite or other prompts in this mode.

/ActionFile=Value

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.

/UseParadoxPasswords=Value

Semicolon separated list of passwords for Paradox tables (if password protected Paradox tables will be used during the process). Can be used only with /DBInterface=BDE option.

/DB=Value

Specifies the name of the target database (a database, in which batch operations with text fields must be performed). This can be a file name, folder name, ODBC DSN, BDE alias name, or ADO connection string. 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 the command line.

/DBInterface=Value

Specifies database interface (database engine) used to connect the source database. Possible values: ADO, FD, INTERBASE, BDE. Default value: ADO.

/DBKind=Value

Specifies source database kind. Possible values: FOLDER, FILE, DSN, CONSTR; the last one must be used only for ADO interface (see /DBInterface description). If not specified, the application will try to detect it automatically.

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

/DBDriver=Value

Specifies source database driver (or database type). Examples of possible values: ACCESS, DBASE, INTERBASE, FIREBIRD, ORACLE, SQL SERVER, etc. If not specified, the application will try to detect it automatically. If the driver name includes spaces, entire parameter must be enclosed in quotes.

/DBUserName=Value

Specifies user name for source database. If the user name includes spaces, entire parameter must be enclosed in quotes.

/DBPassword=Value

Specifies password for source database. If the password includes spaces, entire parameter must be enclosed in quotes.

/Server=Value

Specifies the server address for DB2, SQL Server, Advantage, Informix, Interbase, Firebird, MySQL, PostgreSQL, SQL Anywhere databases. Can be used only with /DBInterface=FD option.

/Port=Value

The TCP/IP port on which the DB2, Advantage, PostgreSQL, MySQL, Interbase, or Firebird database server is listening. Can be used only with /DBInterface=FD option.

/Protocol=Value

Specifies the protocol used to connect to the DB2, Firebird, or Interbase database server. Can be used only with /DBInterface=FD option.

/OSAuthentication

Tells the application to use OS authentication instead of database authentication. Can be used only with /DBInterface=FD option.

/AutenticationMode=Value

Specifies authentication mode for Oracle databases. Possible values: Normal, SysDBA, SysOper, etc. Read Oracle documentation for more information. Can be used only with /DBInterface=FD option.

/VendorLibrary=Value

Path to the client library of the database vendor. Can be used only with /DBInterface=FD option.

/VendorHomepath=Value

Path to the client home directory of the database vendor. Can be used only with /DBInterface=FD option.

/SystemDB=Value

Specifies the path to the system database file for Access databases. Can be used only with /DBInterface=FD option.

/ReadOnly

Tells the application to open Access database in read-only mode. Can be used only with /DBInterface=FD option.

/TableName=Value

Specifies a table name, for which text utilities must be performed. If the name includes spaces, entire parameter must be enclosed in quotes.

/CloseWhenDone

Forces the application to close itself after successful query execution. This option is ignored in silent mode where the application is closed automatically anyway.

/CloseOnError

Forces the application to close itself when error occurs during the command line execution. This option is ignored in silent mode where the application is closed automatically anyway.

/minimize

Application 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 application runs without any windows.

/LogFile=Value

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.

/trim

Tells the application to trim leading and trailing spaces and control characters from field data in a table, specified by /TableName parameter.

/capitalize

Tells the application to convert first character in every word to upper case in field data in a table, specified by /TableName parameter.

/FirstToUpper

Tells the application to convert first character to upper case in field data in a table, specified by /TableName parameter.

/ToUpper

Tells the application to convert field data to upper case in a table, specified by /TableName parameter.

/ToLower

Tells the application to convert field data to lower case in a table, specified by /TableName parameter.

/ReplaceText=Value

Specifies text fragment, which should be replaced in field data in a table, specified by /TableName parameter. Note, that replacement of the text fragments is performed after all other actions, specified in the command line, except adding prefix and suffix. If the text contains spaces, entire parameter must be enclosed in quotes.

/ReplaceWith=Value

Specifies replacement text. If the text contains spaces, entire parameter must be enclosed in quotes. If omitted, then blank string is used (i.e. all text fragments, specified by /ReplaceText parameter, will be replaced with blank strings, or, more simply, will be deleted).

/ReplaceIgnoreCase

When using this switch, the case of symbols is ignored when searching the text, which needs to be replaced.

/AddPrefix=Value

Specifies a prefix to add to the field data in a table, specified by /TableName parameter. Note, that adding prefix and suffix is performed after all other actions, specified in the command line.

/AddSuffix=Value

Specifies a suffix to add to the field data in a table, specified by /TableName parameter. Note, that adding prefix and suffix is performed after all other actions, specified in the command line.

/fields=Value

Specifies names of fields, in which requested operations must be performed. Multiple field names must be separated by semicolon. If the field names contain spaces, entire parameter must be enclosed in quotes. If not specified, all text fields will be processed.

Examples

1. Trimming text fields in dBase table
dbtour.exe /FieldUtils /CloseWhenDone /CloseOnError /DBInterface=ADO /DBDriver=dBase /DB=c:\MyDBFFolder /TableName=customer /trim /fields=LastName;FirstName

2. Replacing text in Access table
dbtour.exe /FieldUtils /CloseWhenDone /CloseOnError /DBInterface=ADO /DBDriver=ACCESS /DB=c:\MyData\Genealogy.mdb /TableName=ADDR /fields=Address1 "/ReplaceText=Mark Tweine street," "/ReplaceText=Mark Tweine str.," /ReplaceIgnoreCase

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

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

;action
/FieldUtils

;options

/fields=Address1
/ReplaceText=Mark Tweine street,
/ReplaceWith=Mark Tweine str.,
/ReplaceIgnoreCase


;target definition
/DBInterface=ADO
/DBDriver=Access
/DB=c:\MyData\Genealogy.mdb
/TableName=ADDR