|
 
|
 
|
|
|
 
|
Klik op het logo voor hulp op afstand
  |
  |
|
|
|
Database objects - interfacing the JoPPS database |
|
The database object classes can be used to:
-
iterate through the different databasetables of the selected JoPPS database
-
find, delete, edit or insert records
-
export and/or import data using JoPPS-Script
A database object interfaces with an underlaying table. It has an in-memory recordbuffer holding
the field values for the current record.
The recordbuffer can be used to:
Database objects: An example
The following example prompts the user to enter the code for an action and add it to each filling record in the filling table.
new_action := AskStr('Specify action code..','','',32);
IF new_action = '' THEN halt;
f := filling.Create(); /* instanciate filling table object */
f.First(); /* position at first record */
WHILE !f.Eof DO /* iterate till at end of file */
{
i := 0;
WHILE i < 10 DO
{
IF Trim(f.action[i].Code.Code)='' THEN
{
f.action[i].Code.Code := new_action;
f.Action[i].Reference := 3;
BREAK;
};
i := i + 1;
};
f.Edit(); /* change the record */
f.Next(); /* position at next record */
};
f.Free();
Constructor
|
CREATE ( ? )
|
|
Destructor
|
FREE ()
|
|
Methods
|
ADDFIELD
|
|
ADDINDEX
|
|
APPEND
|
|
CANCEL
|
|
CANCELRANGE
|
|
CLEARFIELDS
|
|
CLOSE
|
|
CREATETABLE
|
|
DELETE
|
|
DELETETABLE
|
|
EDIT
|
|
EMPTYTABLE
|
|
FINDKEY
|
|
FINDNEAREST
|
|
FIRST
|
|
INSERT
|
|
LAST
|
|
LOCATE
|
|
MOVEBY
|
|
NEXT
|
|
OPEN
|
|
OPENEXCLUSIVE
|
|
POST
|
|
PRIOR
|
|
REFRESH
|
|
RENAMETABLE
|
|
SETRANGE
|
|
Properties
|
ACTIVE
|
|
BOF
|
|
CANMODIFY
|
|
DATABASENAME
|
|
EOF
|
|
EXCLUSIVE
|
|
EXISTS
|
|
FIELD
|
|
FIELDCOUNT
|
|
FILTER
|
|
FILTERED
|
|
FILTEROPTIONS
|
|
INDEXNAME
|
|
ISEMPTY
|
|
READONLY
|
|
RECORDCOUNT
|
|
STATE
TABLESTATE_INACTIVE
TABLESTATE_BROWSE
TABLESTATE_EDIT
TABLESTATE_INSERT
|
table is not active (closed)
table in browse modus
table in edit mode
table in edit mode (insert new record)
|
TABLENAME
|
|
TABLEPATH
|
|
TABLETYPE
|
|
To be documented
|
History
|
|
|
|
|
  |
  |