SQL REQ 2.1

Category/Domain: | Tools
Scol Engine compatibility: | V2.0c and higher
Updated: | 09/2000

# Function

The SQL REQ module provides access to an SQL database; the parameters required to access the database must be entered in the DMI Interface Editor. This module must be used in conjunction with specific modules (Venice, Cryopolis, etc.).

# Configuration

Figure 1: Main SQL REQ module interface

BEWARE ! : This library is not provided in the basic Scol Voy@ger/Engine for it requires ODBC support that may not be found on all machines. It is provided in the form of a Scol plugin : "scolsql.dll" that can be downloaded from the following address:

www.cryonetworks.com (SCOL Tools).

- Copy the scolsql….dll file into the Scol/Plugins folder.

- Edit the usm.ini file:

### The usm.ini file may be easily edited owing to the Scol Voy@ger:

Right-click on the blue Scol icon in the systray, then Advanced…, Expert Mode menus.

- Type the following line :

plugin plugins/scolsql….dll SCOLloadSQL

## 1- Database Name: Name of the database defined in ODBC.

2- Login: User name required to access the database; if not entered, "Admin" is used by default.

3- Password: Indicates the password corresponding to the login; "" by default.

4- SQL Request: Used to define the SQL request that will be run; must respect the SCOL syntax for SQL (the parameters appear as “?” in the request).

5- Parameters: Here the user must define one parameter per line, whereby each line contains the SQL parameter type and value.

#

# Implementation

Action | Function
module.event à SQLReq.SqlDMIParamDMI | Specify two action names in the Reply dropdown list, in the form of a character string built with the SCOL linebuild function (from a list of [S r1] character strings), e.g., action1\naction2\n - The first action in the list will be the action which receives the result as a parameter (if no name is given, the result is sent to the "Result" event)

- The second action in the list will be the action which receives the SqlCod as a parameter (if no name is given, the SqlCod is sent to the "SqlCod" event)

module.event à SQLReq.SqlSentParamSent | Specify two action names in Reply, indicating that they represent a [Sr1] line - The first action in the list will be the action which receives the result as a parameter (if no name is given, the default action name is "Result") - The second action in the list will be the action which receives the SqlCod as a parameter (if no name is given, the default action name is "SqlCod")

The user must also indicate the SQL request to run, and the parameters to use. This must pass as a parameter with the action. The parameter must be a string produced by a strbuild from a [[Sr1]r1] list, whereby the first line contains the string of the SQL request, and the following lines contain the SQL parameter type and value.

module.event à SQLReq.SqlSentParamSentWithErr | Requires a single name in Reply; the error codes are sent inside the result ([Sr1]r1)
module.event à SQLReq.SqlDMIParamSent | Not yet implemented
module.event à SQLReq.SqlSentParamDMI | Not yet implemented

Event | Function

###

### SQLReq.result à module.action

When no action name has been given in the result's Reply, the result of the request is sent by this event and generates an action

SQLReq.resultWithErr à module.action | When no action name has been given in the result's Reply with an error, the erroneous result of the request is sent by this event and generates an action
SQLReq.SQLCod à module.action | When no action name has been given in the SQLCod's reply, the SQLCod of the request is sent by this event and generates an action
SQLReq.log à module.action | The log of the server's request status generates an action

##### Zone

Function

Interface

Assigned

None |  |  |