Items 2.1

Category / Domain : Database
SCOL Voy@ger Compatibility : V 2.0c or above
Update : 1999/01

Function

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

an item is compose; by the following fields :

Note : dateItem value is NIL and is not use by the 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.

Prerequisite

The ITEMS module must be connected to a DataBase via an ODBC link and needs the SQL SCOL plugin.

ATTENTION ! : This library is not include in the main Scol Voy@ger/Engine because it needs the support ODBC, which is not present on all computers. It is available as a SCOL plugin : "scolsql.dll" you can download.

- Copy the file scolsql….dll in the repertory "Scol/Plugins".
- Edit the file usm.ini (in the Scol folder or right-click on the blue SCOL icon in the taskbar, then choose Advanced, Mode Expert.) :
- Enter the following line :

plugin plugins/scolsql….dll SCOLloadSQL

where "scolsql….dll" is the exact name of the dll (respect the case).

Configuration


Figure 1 : ITEMS module interface

(1) : DataBase Name => Name of the DataBase as it is defined in the ODBC manager.

(2) : DataBase Login => Defines the database administrator acces login as defined in the ODBC manager

(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 module ITEMS
module.event à Items.destroy Stops the module ITEMS
module.event à Items.editAdmin Enables the administrator to edit the other user's inventories.
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.add Allows the administrator to add a record in the database if it doesnt exist or to add "count" to "countItem" in the related inventory in the database
module.event à Items.sub Allows the administrator to delete a record if the difference (countItem-count) is negative, or to substract "count" from the "countItem" field of the dataBase.

Event Function
items.destroyed à module Action Closing the ITEMS module generates an action
items.in à module Action Launching the ITEMS module generates an action

Zone Function Interface Assignment
Items.zoneEdition Essential for "editAdmin" and "edituser" actions Client Yes