Klik op het logo voor hulp op afstand
  
 
 
 
 
 
 
 




Common methods and properties


The following properties and methods are common to all JoPPS databasetable classes.

Constructor
CREATE ()
Returns an instanciated database object. Always tests for the return value of the constructor. It can be Nil !
Destructor
FREE ()
Frees the database object.
Common methods
ASSIGN
 
CLEAR ()
Clears the in-memory recordbuffer.
DELETE () : B
Deletes the current record from the databasetable. Returns TRUE if the record was deleted successfully.
The recordbuffer is updated to reflect the new current record.
EDIT () : B
Commit changes made to the recordbuffer to the current record. Returns TRUE if successfull.
FIND () : B
Finds a record. A value for the keyfields of the recordbuffer must be set before calling Find.
If the record is found (result is TRUE) the recordbuffer is updated to reflect the new current record.
FINDNEAREST ()
Positions the current record to the record that most closely matches the key values specified in the recordbuffer. The recordbuffer is updated to reflect the new current record.
 
FIRST ()
Moves to the first record in the databasetable. The recordbuffer is updated to reflect the new current record.
GETBOOKMARK () : Sbookmark
Returns a bookmark for the current record. It can be used as an argument to the GotoBookmark method to return to this record at a later time. A bookmark is a string value holding the records key.
GOTOBOOKMARK (Sbookmark) : B
Positions the current record on the datarecord specified by Sbookmark. The recordbuffer is updated to reflect the new current record. A bookmark is a string value holding the records key.
INSERT () : B
Insert a new record into the databasetable. The recordbuffer is written to the new record.
Returns TRUE if the record is inserted in the databasetable and the newly inserted record becomes the current record.
LAST ()
Moves to the last record in the databasetable. The recordbuffer is updated to reflect the new current record.
LOCATE( ) : B
Finds a record.
example: Locate the record in the Product table
profileTable := PRODUCTS.Create();
profileTable.DoCacheChecks := False;
profileTable.DoCacheSearch := False;
profileTable.Clear();
profileValue  := profileCode + ',' + NumToStr(profileLength,1,0);
profileTable.Locate('CODE_PRODUKT;CODE_LENGTE',profileValue;)
NEXT ()
Moves to the next record in the databasetable. The recordbuffer is updated to reflect the new current record.
PRIOR ()
Moves to the previous record in the databasetable. The recordbuffer is updated to reflect the new current record.
READ ()
Rereads the current record into the recordbuffer.
WRITE ()
Writes the contents of the recordbuffer to the current record.
Common properties
BOF : B

Is TRUE if the current record is the first record in the databasetable.

DoCacheSearch
Sinds versie 3.10 van JoPPS is de I/O met de databanken aangepast voor optimaler gebruik van de caches.
Er zijn extra properties voorzien om dit gedrag uit te schakelen DOCACHESEARCH en DOCACHECHECK. Zolang de caches niet uitgeschakeld zijn zal de FIND methode zoeken in de caches en geen invloed hebben op de current record van de tabel waarop je werkt, met oneindige lus tot gevolg.
 
Methodes zoals FIRST, NEXT, LAST, LOCATE blijven op tabel werken omdat nooit de volledige tabel in de cache zit. De FIND en FINDNEAREST methodes zijn wel geimplementeerd om standaard eerst in de caches te zoeken omdat deze gebruikt worden in acties zoals_ONBEFORECACULATE, ... om het project nog te manipuleren alvorens te rekenen.
DOPOSTCHECKS
 
DESC [0..4]
Record description, most databasetables have up to 5 different descriptions - one for each language in the current languageset. Some records have only one record description. (eg. contacts)
EOF : B
Is TRUE when the current record is the last record in the databasetable.
RECORDCOUNT : Dcnt
The number of records in the databasetable.
OWNER : S
Id of JoPPS used to made the last change to the current record.
MODIFIED : Ddatetime
Timestamp of last change made to the current record.
HELPTOPIC
 
FILTER : Dflags
Current record filter, defines the categories set for the current record.
REMARK : S
Rrecord remark.
CODE
 
HIDDEN
 
READONLY
 
RECORDCOUNT
 

 
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