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:
  • find a specific record in the databasetable
  • insert a new record in the databasetable
  • edit the current record
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  |
 
 

 
 
 
TECHWIN SOFTWARE
De Regenboog 11
B-2800 Mechelen
T +32(0)15 44 64 64
T +31(0)30 899 32 15 Nederland