![]() | ![]() | ![]() | ![]() |
This section explains how to check that the Easysoft SQI-Sage Tetra CS/3 Driver is connecting your Sage Tetra CS/3 data and how to set up additional local data sources on Unix.
You can choose to create a data source called TETRA to point at your Sage Tetra CS/3 data when the Easysoft SQI-Sage Tetra CS/3 Driver is installed.
This is used as an example in Querying a data source to illustrate how to validate that a connection has been made after the installation process has been completed.
In addition to the TETRA data source, new data sources may be created, as shown in Creating additional data sources, to:
A correctly configured data source can then be connected to from any ODBC-compliant application.
Once you have installed the Easysoft SQI-Sage Tetra CS/3 Driver, you can type SQL queries at the system prompt.
This allows you to test whether or not the Easysoft SQI-Sage Tetra CS/3 Driver is successfully accessing your Sage Tetra CS/3 data.
An Easysoft script called isql is provided to enable you to run the SQL command without needing to set LD_LIBRARY_PATH.
This script determines the LD_LIBRARY_PATH values from a separate configuration file (es.ld.so.conf) and then runs the 'sql' command, specifying the data source to query and the user name and password to use to access the data source.
By default, this script specifies:
If you have different logon details (e.g. if you have changed the password for the manager user, as explained in Administration), edit the script to change those details.
| Before editing the isql script, you will need to change permissions to the file so that you are able to edit it, but remember to remove write permissions to the file after you have finished. |
If you have more than one data source, you can create a copy of the isql script for each data source and specify the appropriate data source name in each copy of the script, giving you a script ready to run for querying each data source.
To query a data source using the isql script:
1. Change into the <InstallDir>/easysoft/sqi/tetra directory.
If an 'invalid user' or 'invalid password' error is displayed, check that the script specifies the correct user name and password.
If a line beginning "conn =" is displayed, then the connection has been made and you can type an SQL statement to query the data source.
select * from sys.sop_order_header;
To finish your SQL session, press <Enter> to return to the system prompt.
Another utility, also called isql, is included in unixODBC, the Open Source ODBC Driver Manager for non-Windows platforms, which is installed with the Easysoft SQI-Sage Tetra CS/3 Driver on Unix.
To run this program, go to the <InstallDir>/easysoft/unixODBC/bin directory and type:
./isql DSN [UID [PWD]] [options]
Type ./isql only for option details.
If you have more than one Sage Tetra CS/3 data source, any additional data sources must be added manually so that the unixODBC Driver Manager can access them:
1. Change into the /usr/local/easysoft/sqi/tetra directory.
2. Open the file dsn_template.sample in an editor.
3. Edit the following settings:
4. Save the file under a new name.
5. Change into the /usr/local/easysoft/unixODBC/bin directory.
odbc_system_dsn=1 ./odbcinst -i -s -ffilename
where filename is the name you chose at step 4.
This creates a system-wide data source in the odbc.ini file, so that it can be accessed by the unixODBC Driver Manager.
See odbc.ini settings for details of other settings that you can specify in odbc.ini.
| Data sources can also be created by adding their attributes directly into the odbc.ini file. |
If you are running the Easysoft SQI-Sage Tetra CS/3 Driver on a Unix machine, you will probably set up data sources by editing dsn_template.sample (see Creating additional data sources).
However, if you intend to edit odbc.ini directly, you should be familiar with all the data source parameters that can be specified (by default, odbc.ini is located in the /etcdirectory):
| [data source name] | e.g. [TETRA] |
| driver = SAGE_TETRA_CS3 | |
| sort_path = /tmp | Temporary directory |
| sort_mem_size = 256 | Amount of memory allocated for sorts before the results are saved to disk |
| rs_mem_size = 256 | Number of rows that will cache into memory before being stored on disk |
| rs_path = /tmp | Temporary directory |
| blob_path = /tmp | Temporary directory |
| sqicount = 1 | Number of SQIs used by the data source |
| target_string1 = Tetra SQI | Connection string for SQI |
| target_driver1 = /usr/local/easysoft/sqi/tetra/libestetra_sqi.so | Required SQI driver |
| dtcount = 1 | Number of data type libraries present for Sage Tetra SQI |
| dtlibrary1 = /usr/local/easysoft/sqi/tetra/libestetra_dt.so | Library for data type conversions |
| tetra_path = path of Sage Tetra CS/3 installation | e.g. /u/cs3 |
| schema_path = /usr/local/easysoft/sqi/tetra/schema/ | Directory where the schema files for the data source are stored |
| cache_expiry = 2 | How long files are cached open for (default is 2) |
| cache_maxopen = 30 | Maximum number of concurrently cached files (default is 30) |
| logging = 3 | See Logging options. |
| logfile = /tmp/tetra | See Logging options. |
| default_uid = | Specify a default user name for the data source. This overrides any user name specified in the data source on the client (so clients need not enter a Target User when configuring their data source). |
| default_pwd = | Specify a default password for the data source. This overrides any password specified in the data source on the client (so clients need not enter a Target Auth password when configuring their data source). |
| spare_columns = 1 | Allow columns prefixed with spare_ to be returned |
| uppercase_names = 1 | Changes lowercase table names to uppercase so that you do not need to enclose table and column names in quotation marks when querying the data source. Set this to 0 if you do not want your table names uppercased. Table names in mixed case are not affected. |
| default_company = | If your Sage Tetra CS/3 data contains multiple companies, specify the company that you want to work with by default. You can then omit the company's schema name from your queries. This setting works in conjunction with the one_company setting. |
| one_company = 1 | Set to 1 to retrieve tables from the default_company only. When this is on, the driver effectively ignores any schema name you might specify in a query and uses that of the default_company. |
| The default_company and one_company settings do not restrict access to Sage Tetra CS/3 companies via the Web Administrator. |
By including particular settings in your odbc.ini file, you can specify various levels of logging.
| Enabling logging will seriously impair performance so remember to disable it once you have finished. |
To enable logging, include the logfile= and the logging= lines in your odbc.ini file:
You can enable multiple logging options simply by adding the values together. For example, for entry, exit and expression logging, 1+2+16=19.
The Easysoft SQI-Sage Tetra CS/3 Driver includes a facility for the manager user to obtain write access to the Sage Tetra CS/3 data.
This means, for example, that the manager user could display Sage Tetra CS/3 data in Microsoft Access, make changes to it, then save the changes back to the Sage Tetra CS/3 data source.
| Although Easysoft provides the ability to insert, amend and delete information in the Sage Tetra CS/3 database, no validation is performed against the standard Sage Tetra CS/3 business logic. Therefore, if you enable this write access, you do so at your own risk. Easysoft cannot be held responsible for any damage to, or loss of, your Sage Tetra CS/3 data. Refer to the Easysoft License Agreement for full warranty details. |
To enable write access for the manager user, include the following settings in the odbc.ini file (remove these lines or set them to 0 to disable write access).
| allow_insert = 1 | Allows new data to be inserted |
| allow_delete = 1 | Allows data to be deleted |
| allow_update = 1 | Allows data to be updated |
| Copyright Notice |
![]() | ![]() | ![]() | ![]() |