These are main configuration options.
These options can be changed at 3 different levels:
▪ At the driver level.
▪ At the alias level.
▪ In a TDatabase component of the application.
SERVER NAME
This is the name (or IP address) of your AS/400. It is possible to change it at run time and connect to multiple AS/400 at the same time.
NETWORK
It represents the network type to use to connect to the AS/400.
If blank, the default value is taken from ACE/400 configuration.
Other possible values are :
• Tcp for TCP/IP.
• ehn for all EHNAPPC routers (like Client/Access, Netsoft, ...).
• sna for Microsoft SNA server.
LIBRARY NAME
This is the default working library. If in your applications you don’t name the library, the value will be the default one.
Valid values are :
• any existing library name on your AS/400
• *LIBL
• *USRLIBL (default)
• *CURLIB
BROWSE LIBS
During design time, a special dialog box prompts allowing you to browse the files of your AS/400.
If you don’t want to see this dialog box, change this option to FALSE. The files will be the files of the library specified by ‘LIBRARY NAME’ option.
Default value is TRUE.
CODEPAGE FILE
This is the name of a codepage file, to allow custom EBCDIC-ASCII conversions.
In most cases, you will NOT need to fill this setting. The appropriate code page will be automatically chosen by analyzing your PC and AS/400 configuration.
Be careful: You must specify the FULL PATH of the file.
The code page files are provided in the "international pack".
If you don’t have the codepage file and for Korean/Japan/China countries, please install the International pack to have appropriate conversion pages.
To know which is the codepage file for your AS/400, make a DSPSYSVAL QCCSID on a green terminal.
C:\Program Files\EasycomINT\e285ansi.cpg
CONVERSION RULES
This parameter allows to customize field conversion rules.
It contains a list of rules separated by a semicolon.
Possible rules are :
•
LONGNUM=double
By default, a number (PACKED or ZONED) that cannot fit a double is converted to characters. With this option, it is converted to a double (and can lose precision).
•
LONGNUM=BCD
With this option, big numbers will be converted to Delphi BCD type. But unfortunately, most visual components do not support this data type.
•
LONGNUM=COMP
With this option, big integer numbers will be converted to Delphi 64-bit integer.
This option can be combined with other (for example CONVERSION RULES=
By default, this option is enabled from version 5.0 of the BDE (disabled is other cases).
• LONGNUM=NOCOMP
• SMALLPACK=integer
By
default, a small packed or zoned field (under 5 digits with no decimals) are
converted to the Delphi type ‘smallint’. When setting this option,
it makes these fields to be converted to integers.
Example of use:
CONVERSION RULES=LONGNUM=DOUBLE;SMALLPACK=INTEGER
CMTCTL
Set it to TRUE if you want to work with transactions.
You will be able to use BeginTransaction. Default is FALSE.
EACUNLOCK
This option allows advanced protection of your Client/Server programs.
See section 'Easycom For Delphi program protection' for more information.
LANGDRIVER
This is the default language driver for your PC. Default is ANSI.
LOCKTYPE
This option is used to choose the way of locking records when using physical/logical file accesses.
Two possible values are :
• PESSIMISTIC (default)
With this value, the record is locked during the whole process of editing a record.
For example, with Delphi the record is locked with the Table.Edit and release with Table.Post.
So if different users try to modify the same record, other users must wait for the record post.
• OPTIMISTIC
With this value, the record is only locked when trying to update the record.
If the record has been modified by another user since the Table.Edit, the update is canceled, and a Bde exception is raised.
LOCKTYPESQL
This option is similar to LOCKTYPE but is application to SQL queries.
With SQL, when using this option with 'OPTIMISTIC' setting, SQL statements will always be opened read/only. Updates, Delete and Insert orders will be performed by separated SQL statements. Default value is PESSIMISTIC.
PRIVATE SESSION
Set it to TRUE if you want that each connection (by a TDatabase Component) must be one different connection on the same AS/400.
Default is FALSE.
LOG LEVEL
This allows you to make a text trace of operations that are made by the server. If 0, no trace is made.
Default is 0.
LOG FILE
Represents the file on the AS/400 that will be created if LOG LEVEL is not zero.
OPTIONS
This is the general-purpose alias option.
The syntax of the value is a semicolon-separated list.
Example:
LOCALFILTER=TRUE;DEFAULTNULL=TRUE
Supported sub options are:
CRTTABLE SCRIPT=<path>
This option creates an SQL script for tables and index creation. With this option enabled, all file creation will be performed with SQL (otherwise we will use DDS in case of non-using of long table names).
<path> is the name of the script file to create.
LOCALFILTER=TRUE
This option allows a local processing for filters. It is a useful value if the application filters only small files. It means that all data (non-filtered) will be transferred on PC side, and then filtered by the ACE400 driver.
Otherwise, the filters will be performed on the AS/400 side (by an OPNQRYF). With server-side filters (default behavior), only one filter at a time is allowed for each access path (physical/logical).
Note: you also can set-up this option for each file with the PROPERTIES options. Default value is FALSE.
DEFAULTNULL=TRUE
This option allows to have null values by default for each field. Otherwise, you will get blank values for each field (except for a Date field that will get null if the field is null-capable or 1/1/0001 if not null capable).
This option will have an effect only on Null-capable fields.
Default value of this option is FALSE.
USEALIASES=TRUE
By default, ACE/400 will use field alias names as long field names. This provides a easy migration for an SQL application to an ACE/400 application.
But for backward compatibility purposes, you might want to not use the alias names (and then use the regular 10 digits field names). You can set this option to FALSE to do this.
Default value for this option is FALSE.
CACHEDSQL
This allows to have a local SQL (or stored procedure) result. This makes multi-selection easier, and prevents for unwanted refresh.
The syntax is:
CACHEDSQL=n/ALL<,m<,MIN/MAX>>
n is the upper limit of the number of rows that we can hold in memory for a query.
ALL value means no limit.
m is the number of rows that we can read in one time. Default is 32kb of data.
MIN means that m cannot be greater.
MAX means that is m is a too small value (less than 32Kb of data), the value will be increased to have 32kb of data. Default is MIN is m is specified.
Here are sample of syntaxes:
CACHEDSQL=ALL ==> queries and stored procedure result sets will be hold completely in memory (if the use pushes the 'LAST' button). Data will be fetch by 32kb of data.
CACHEDSQL=ALL, 100 ==> queries and stored procedure result sets will be hold completely in memory (if the use pushes the 'LAST' button). Data will be fetched by 100 records
CACHEDSQL=ALL, 100, MAX ==> queries and stored procedure result sets will be hold completely in memory (if the use pushes the 'LAST' button). Data will be fetch by 100 records or by 32kb of data if the record size is small
CACHEDSQL=10000, 100 ==> queries and stored procedure result sets will be hold completely in memory (if the use pushes the 'LAST' button). Data will be fetched by 100 records. If there are more than 10000 rows in the result, the cached SQL will abort, and dynamic SQL will be used instead.
This CACHEDSQL parameter is in the 'OPTIONS' BDE parameters. So you can have:
OPTIONS=
If you want to combine Cached and non-Cached queries, you need to define two TDatabase components (the connection can be shared).
If you define a 'PESSIMISTIC' request live query, the option will have no effect.
JOBNAME=
BIGPARAMTYPE=MEMO/CHAR
VARLENGTH
This option allows to customize AS/400 Variable Length fields handling.
If you put ‘VARLENGTH=MEMO’, it will convert it to Delphi’s memo fields.
By default, it will convert it to simple Delphi’s string fields.
STOREDPROC=SQL
SQLCAUSISTANTBM=TRUE
Additional treatment for better stability of DBGrid, in multi-selection mode.