These functions are used to modify the database. Naturally these should be used with care, since modifications cannot be simply undone, and anything modified through functions is likely to be done without the user knowing it has happened.
There is a subtle but important issue when changing database field values -- changes are queued up and "flushed" to the logs and to other workstations only when it expects changes, e.g. in data dialogs, when a change to an entry field is noticed. If you set fields through scripting, it won't flush those until the next time a "change" is noticed. Even inside a dialog, you need to make sure you use DlgSetChangedFlag(.T.) if you manually change data fields directly in a record, in case no other changes are made on the dialog entry fields that would normally trigger a flush.
(Back to Function Types List)
Arguments: | rRecordLinked, cNotes |
Description: | Creates a new journal entry record, attached to the given database record (use NullRecord() for a global journal entry). Returns the new journal record. |
Description: | Creates a new record in the given table and adds it to the database, with blank fields (except the record ID which is automatically generated) |
Arguments: | rCustomer, rSite |
Description: | Creates a new reservation record for the given customer on the given site and adds it to the database. The Site may be NullRecord() for unassigned reservations. It's also properly linked to the customer |
Description: | Creates a new transaction record for the given reservation or customer (which can be a NullRecord) and adds it to the database. It's also properly linked to the reservation and/or customer as appropriate |
Description: | Creates a new copy of the given record, copying all of its data, and adds it to the database. Note that any links are also copied, however link-backs are not fixed up (e.g. if a Resv is copied, it still needs to be added to the Cust's Resv list manually to avoid being an 'orphaned' record, and the transaction list needs to be cleared out to avoid double-linking to any existing transactions). |
Description: | Deletes a record from the database. Note that this won't necessarily delete it 'properly', e.g. any linked references to this record may not be cleaned up. Transactions can be deleted safely (the references from the reservation and/or customer are handled as needed), but be very careful about deleting other record types. |
Description: | Locks the record for upcoming changes, and returns TRUE if the lock was successful |
Description: | Locks the global setting (actually its whole section) for upcoming changes, and returns TRUE if the lock was successful |
Function: | LockSettingLocal |
Arguments: | cSection, cKey [, nWorkstaton] |
Description: | Locks the local setting (actually its whole section) for upcoming changes, and returns TRUE if the lock was successful. If no workstation number is specified, uses the current workstation number |
Description: | Reads all 'Setting' values , and refreshes the displays -- this is usually required after any SetSetting... functions in order for setting changes to actually take effect. |
Description: | Refreshes the main display (e.g. the current Tab View being displayed). This may need to be used after changing reservation information so the changes are reflected on the Rack, for instance. Always returns True. |
Function: | ReIndexSiteReservations |
Description: | Rebuilds an internal Site/Reservation index -- this should be called any time the site assigned to a reservation is changed, or a reservation is deleted or added. This does not automatically refresh the screen (use RefreshDisplay). The return value is always True. |
Arguments: | rRecord, cFieldName |
Description: | Sets the given field of a record to 'blank'. Returns TRUE if successful |
Arguments: | rRecord, cFieldName, bValue |
Description: | Sets the boolean value for the given field of a record. Returns TRUE if successful |
Arguments: | rRecord, cFieldName, dValue |
Description: | Sets the date value for the given field of a record. Returns TRUE if successful |
Arguments: | rRecord, cFieldName, cValue |
Description: | Sets the text value for the given field of a record. Returns TRUE if successful |
Arguments: | rRecord, cFieldName, cValue |
Description: | Sets the text value for the given field of a record (for special use with fields like linked lists, encrypted data, etc). Returns TRUE if successful |
Arguments: | rRecord, cFieldName, dValue |
Description: | Sets the time value for the given field of a record. Returns TRUE if successful |
Arguments: | rRecord, cFieldName, nValue |
Description: | Sets the numeric value for the given field of a record. Returns TRUE if successful |
Function: | SetFieldAddLinkedRec |
Arguments: | rRecord, cFieldName, rAddRec |
Description: | Adds a record link to the given linked list field. Returns TRUE if successful |
Function: | SetFieldRemoveLinkedRec |
Arguments: | rRecord, cFieldName, rRemoveRec |
Description: | Removes a record link from the given linked list field. Returns TRUE if successful |
Function: | SetFieldMoveLinkedRecUp |
Arguments: | rRecord, cFieldName, rMoveRec |
Description: | Moves a record link up in the given linked list field. Returns TRUE if successful |
Function: | SetFieldMoveLinkedRecDown |
Arguments: | rRecord, cFieldName, rMoveRec |
Description: | Moves a record link down in the given linked list field. Returns TRUE if successful |
Arguments: | cSection, cKey, bValue |
Description: | Sets the boolean value for the given system global setting. Returns TRUE if successful. Note: You may need to use the ReadAllSettings() function (or restart the program) before the new settings take effect. |
Function: | SetSettingLocalBool |
Arguments: | cSection, cKey, bValue [, nWorkstaton] |
Description: | Sets the boolean value for the given system local setting. Returns TRUE if successful. If no workstation number is specified, uses the current workstation number. Note: You may need to use the ReadAllSettings() function (or restart the program) before the new settings take effect. |
Function: | SetSettingLocalText |
Arguments: | cSection, cKey, cValue [, nWorkstaton] |
Description: | Sets the text value for the given system local setting. Returns TRUE if successful. If no workstation number is specified, uses the current workstation number. Note: You may need to use the ReadAllSettings() function (or restart the program) before the new settings take effect. |
Function: SetSettingLocalTextEncrypted
Arguments: | cSection, cKey, cValue [, nWorkstaton] |
Description: | Sets the text value for the given system local setting, using encryption. Returns TRUE if successful. If no workstation number is specified, uses the current workstation number. Note: You may need to use the ReadAllSettings() function (or restart the program) before the new settings take effect. |
Function: | SetSettingLocalValue |
Arguments: | cSection, cKey, nValue [, nWorkstaton] |
Description: | Sets the numeric value for the given system local setting. Returns TRUE if successful. If no workstation number is specified, uses the current workstation number. Note: You may need to use the ReadAllSettings() function (or restart the program) before the new settings take effect. |
Arguments: | cSection, cKey, cValue |
Description: | Sets the text value for the given system global setting. Returns TRUE if successful. Note: You may need to use the ReadAllSettings() function (or restart the program) before the new settings take effect. |
Function: | SetSettingTextEncrypted |
Arguments: | cSection, cKey, cValue |
Description: | Sets the text value for the given system global setting, using encryption. Returns TRUE if successful. Note: You may need to use the ReadAllSettings() function (or restart the program) before the new settings take effect. |
Arguments: | cSection, cKey, nValue |
Description: | Sets the numeric value for the given system global setting. Returns TRUE if successful. Note: You may need to use the ReadAllSettings() function (or restart the program) before the new settings take effect. |
Page URL https://CampgroundMaster.com/help/databasemodification.html
Campground Master Home