ODBC
Overview PxPlus SQL Command Line Client
 

The PxPlus SQL Command Line Client connects to local or remote PxPlus data and executes SQL commands. This tool is built on top of the ODBC driver and therefore it supports the same SQL syntax and scalar functions as the ODBC driver. Its based off of the ODBC driver and therefore can connect using a DSN defined for our ODBC driver (see Local & Client Configuration for details) or it can connect using a connection string used by our ODBC driver (see Connection String Keywords for details).

By providing a command line client that can access PxPlus data users now have a fast and simple way to query, update, and write PxPlus data. This also makes it a great tool to test PxPlus data, the ODBC driver, and connection settings. Plus the SQL Command Line Client can be executed from web pages, scripts, and applications providing new ways to use your PxPlus data.

There is both a Windows and UNIX/Linux version of the PxPlus SQL Command Line Client. The Windows version of the SQL client gets installed with the PxPlus ODBC driver version 10 or higher (for installation procedures see File IO Product Installation and Activation (Windows)). The UNIX/Linux version of the SQL client has a stand alone installation package (for installation procedures see PxPlus SQL Command Line Client Installation (UNIX/Linux)).





*Note* The UNIX/Linux version of the PxPlus SQL Command Line Client has a stand alone installer because there is no UNIX/Linux PxPlus ODBC driver. As stated above the PxPlus SQL Command Line Client is built on top of the ODBC driver but the ODBC driver it is built on does not implement all required functionality to be a working UNIX/Linux ODBC driver and therefore it can only be used as a base for the SQL client.




Running the SQL Command Line Client To run the SQL Command Line Client, simply run the pxpsql program:

dir/pxpsql [Connection Info] [Options] SQL COMMAND

Where dir is the diretcory path; e.g., /usr/pxpodbc

Connection Info One of the following connection info paramters must be specified:

-d path
--directory path
The path of the Data Dictionary File (DDF) which is the relative starting point for all embedded file references. For more details see PxPlus Data Dictionary.
-f path
--config-file path
The path and file name of the config file. Note that if other options are specified they override configuration in the config file. The config file is an INI style file which accepts parameters that are the same as the long form pxpsql parameters. The following is an example config file

-c conn_str
--connection-string conn_str
Specify the connection string directly. This ignores other connection info parameters. For more details see Connection String Keywords.
Options These are optional connection info parameters:

-i path
--ini-file path
The path and file name of the INI file used to define the data dictionary manually for files that cannot be handled by the PxPlus embedded data dictionary. For more details on INI files see INI Definition.
-v path
--view-dll path
The path and file name of the PxPlus DLL/SO file. This is required in order to use the Views system.
-x path
--prefix path
Search paths to be inserted in front of all relative file references. Use comma ',' to separate multiple prefixes.
-s address
--server address
Network name or IP address required for connecting to the PxPlus IO Server. For more details see PxPlus File Server.
-p port
--port port
TCP/IP Port required for connecting to the PxPlus IO Server. For more details see PxPlus File Server.
-z
--compression
Enable ZLib compression to minimize network traffic between the client and the server.
-j name
--company name
Value to replace occurrences of %%C$ in a definition pathname.
-u name
--user name
Value to replace occurrences of %%U$ in a definition pathname.
-w password
--password password
Password value, used in conjunction with a Sage MAS 90 or Sage MAS 200 system only.
-o ID
--session-id ID
Value to replace occurrences of %%S$ in a definition pathname.
-r
--dirty-read
Enable dirty read mode which causes normal file consistency checks to be skipped.
-e
--enforce-double
Enable treating numeric data as doubles.
-b
--burst-mode
Enable burst mode which reduces the number of times a file is locked by holding the lock for either 50 operations or 3/10 of a second whichever comes first.
-n
--null-date
Enable suppression of invalid date error.
-k
--key-restrict
Enable key restrict mode. This option allows the driver to be used with applications that do not support keys, or supports keys with limitations.
-t
--strip-trailing-spaces
Enabling to strip trailing spaces from key values when joining multiple tables.
-q
--silent
Enable suppression of most messages.
-a size
--cache-size size
Amount of memory in MB used for local storage of intermediate results.
-l path
--log-file path
Output debugging information to a specified log file.
-y
--read-only
Disable write access for this SQL command.
-g separator
--separator separator
Set separator string used to update query results. Default value is "|".
-m
--html
HTML output mode. In this mode query results are outputted as html table data.