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. |
Function: | HerculesLockSite |
Description: | Lock a Site on the Hercules online reservation system -- should be called before making any reservation changes that could affect its length, or on any site before creating a new reservation on it (or changing a reservation to the site), to ensure it's available. Will return True if lock is successful, False if failed for any reason. |
Function: | HerculesNotifyAddResv |
Description: | Notify the Hercules online reservation system that a new reservation has been added. |
Function: | HerculesNotifyCancelResv |
Description: | Notify the Hercules online reservation system that a reservation has been deleted or canceled. |
Function: | HerculesNotifyChangeResv |
Description: | Notify the Hercules online reservation system that a reservation may be changing (call before making the changes to the reservation itself -- the appropriate notifications will be sent when a change is detected). |
Function: | HerculesNotifyChangeSite |
Description: | Notify the Hercules online reservation system that a site may be changing (call before making the changes to the site itself -- the appropriate notifications will be sent when a change is detected). |
Function: | HerculesUnlockSite |
Description: | Unlock a Site on the Hercules online reservation system -- should be called when finished making potential changes that might affect site availability. |
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 |
Arguments: | rRecord, nEventType |
Description: | Process the indicated type of Event Action for the given record. The Event Type is numeric -- look up the value through the Fixed Lists, Event Types. The return value is the event result, e.g. if it's False for a 'Before' event, that means the operation should be aborted. |
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. |
Function: | ResvLinkAsNonSynced |
Arguments: | rChild, rParent |
Description: | If possible, links the reservation rChild to rParent as Non-Synchronized. Returns True if the reservations were successfully linked, False if something prevented it. |
Function: | ResvLinkAsSubMember |
Arguments: | rChild, rParent |
Description: | If possible, links the reservation rChild to rParent as a Sub-member. Returns True if the reservations were successfully linked, False if something prevented it (e.g. incompatible as sub-member reservations). |
Function: | ResvLinkAsSynced |
Arguments: | rChild, rParent |
Description: | If possible, links the reservation rChild to rParent as Synchronized. Returns True if the reservations were successfully linked, False if something prevented it (e.g. incompatible as synchronized reservations). |
Function: | ResvMakeNonSynced |
Description: | Changes the linking method of this reservation (to its parent) to Non-Synchronized, if possible. Returns True if it was successfully changed, False if something prevented it.. |
Function: | ResvMakeSubMember |
Description: | Changes the linking method of this reservation (to its parent) to Sub-member, if possible. Returns True if it was successfully changed, False if something prevented it. |
Description: | Changes the linking method of this reservation (to its parent) to Synchronized, if possible. Returns True if it was successfully changed, False if something prevented it. |
Function: | ResvUnlinkFromAll |
Description: | Unlinks this reservation from all other reservations, making it a standalone reservation. Rearranges any others it was linked with as needed (moving any children up to its parent, etc). Returns True if the reservation was successfully unlinked, False if something prevented it. |
Function: | ResvUnlinkFromParent |
Description: | Unlinks this reservation from others above it, but keeps any children linked to it. Returns True if the reservation was successfully unlinked, False if something prevented it. |
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