ITEMS 2.1

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

# Function

The ITEMS module must be connected to a database via an ODBC link and it requires the ScolSQL plugin.

NB. : 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

It is used for the following purposes:

- For a client, to edit their inventory; a client's inventory is made up of items.

An item consists of the following fields:

- a reference: refItem

- a name: nameItem

- a quantity: countItem

- a date: dateItem (not used in this module)

- For an administrator, to edit the inventory of other clients.

- To complete a client's inventory with the information contained in a database when the client connects.

Configuration

Figure 1: Main ITEMS module interface

1- DataBase Name: Defines the name of the database.

2- DataBase Login: Defines the database access login.

3- DataBase: Login password.

4- SQL Request: Defines the SQL request run to load the items (e.g.: SELECT refItem, nameItem, countItem FROM tableItems WHERE login = ?).

#

# Implementation

Action | Function
module.event à Items.start | Starts the ITEMS module
module.event à Items.destroy | Stops the ITEMS module
module.event à Items.editAdmin | Enables the administrator to edit the inventory of other CLIENTS.
module.event à Items.editUser | Must be connected to a login module in order for a user name to be defined; displays the client's inventory and allows them to edit it.
module.event à Items.getItems | Must be connected to a login module which defines a user name; completes the CLIENT inventory with the information contained in the database. example: login.loginChanged --> item.getItems
module.event à Items.sub | Allows the administrator to destroy a record if the difference (countItem-count) is negative, or to subtract "count" from the "countItem" field on the database.

Events | Function
items.destroyed à module.action | Closing the ITEMS module generates an action
items.in à module.action | Starting the ITEMS module generates an action

##### Zone

Function

Interface

Assigned

Items.zoneEdition | Essential for 'editAdmin' and 'edituser' actions | Client | Yes