partialdatabaseupdate
UPDATEPACKAGE

The partialdatabaseupdate statement updates one or more components of an existing database.


Parameters

This statement has one parameter:

updatepackage – path and filename of package containing updated components. This package is normally created with the savepartialdatabase statement.


Description

This statement updates one or more sections of an existing database with components saved via the savepartialdatabase statement. This can be used to distribute updates (for example to update a database’s procedure code without disturbing the data), and is used internally by Panorama X Server to upload and download new database generations.

Suppose you had earlier made a copy of a database on a second computer, then modified the procedures on the first procedure. Now you want to transfer these procedures to the second computer without disturbing the data on the second computer. On the first computer, start by saving just the procedures from the current database into a package like this:

savepartialdatabase "procedures","~/Document/Update.panpartialdb"

Next, transfer this Update.panpartialdb file to the second computer, open the copy of the database you want to update, and run the code below (this assumes the update file has been copied into the Documents folder on the second computer):

partialdatabaseupdate "~/Document/Update.panpartialdb"

If you wanted to update both procedures and forms, use this code to save the update file on the first computer:

savepartialdatabase "forms,procedures","~/Document/Update.panpartialdb"

If the update file was created with the data option, the field structure and data will be updated. This means that any data in the updated database will be wiped out when the partialdatabaseupdate statement is run. The partialdatabaseupdate statement cannot change the database field arrangement (or field data types) without also wiping out the data in the updated file. If you want to preserve the data, you will have to export it first, then figure out how to import it again with the data in the correct fields after the structure has been updated. This has to be done manually by your code.


See Also


History

VersionStatusNotes
10.2NewNew in this version.