In most cases, a database is uploaded to a Panorama X Server so that it can be shared among multiple Panorama users, and sometimes also so it can be published to web pages. But coordinating data between multiple users restricts Panorama’s ability to make wholesale changes to a database. Code written for web publishing cannot normally perform operations that can’t be synchronized – operations like deleting all records, removing unselected records (or selected records), or replacing all of the existing data in a database with text or data from another database. However, if you are willing to forego the abillity to synchronize the data to Panorama clients, you can use these capabilities. In that case the data isn’t shared among multiple Panorama clients, it is kept only on the server. You can download the data to a client, but you cannot edit the data on clients, and you cannot synchronize any changes. This option is especially handy for “scratch” databases that aren’t used for permanent storage, but only to manipulate data on the server.
To create a web only database first make a single user database as you would normally, setting up all of the necessary fields and any initial data. You’ll probably also want to set up the procedures you want, but this can also be done later. Once the database is ready, you’ll use the Sharing panel of Database Options dialog to upload it to the server, as described in Creating a Shared Database. However, you’ll need to set one extra option before you upload, the No Synchronization (Web Only) option.
That’s it, just set this option, upload the database, and you’re all set for web only operation. (Be sure to do this before you upload – this option can’t be changed once the database has been uploaded. The only way to change this option later is to delete the database from the server and start over.)
Even though the database is web only and the data doesn’t synchronize, you can still open the database on the client. It won’t synchronize, and you can’t edit the data on the client, but you can:
When you open the database on the client, the sharing icon changes to an eye with a slash through it to indicate that the database is in web only mode.
In this mode the database is semi-connected to the server. You can’t edit the data, lock records, or synchronize changes made on the server to the client. But you can upload individual procedures and forms, you can download all the data from the server, and you can upload a new generation of the database to the server (for example to add a field).
Like any other web published database, a “web only” database will contains procedures that respond to web queries by setting the global cgiHTML variable. But since there is no synchronization with Panorama clients, these procedures have the flexibility to make wholesale changes to the database. Essentially the code can do anything that a single user Panorama database can do.
For example, the code can use the removeunselected, removeselected, or deleteall statements to remove multiple records at once from the database, even to remove all of the existing data, and at full RAM speed.
The code can also use the "ExistingData","Replace"
option with the importtext, importdatabase and importjsonarray statements. This option will remove all of the existing data and replace it with the imported data. This will also reset the record id numbers, so that the new data starts with a record ID of 1. (This also happens when the deleteall statement is used.)
The code can also make bulk changes to a field using the formulafill, propagate, propagateup, unpropagate and unpropagateup statements. The code can also use the formulafillallfields statement to modify all fields at once. (Note: Do not use the serverformulafill statement in web only code, just use the regular formulafill).
Of course the code can also add, delete and modify individual records. It does not perform record locking as it does this, and it does not keep track of which records have been deleted.
If enabled (see Advanced Server Settings), Panorama X server normally keeps a journal of all unsaved changes made to each server database, allowing the changes to be recovered if there is a power failure or crash before the database can be saved. However, this journal feature cannot record wholesale changes like deleting all of the records, so the journal function is disabled when using a web only database.
Since journalling is not active for a web only database, Panorama X Server also ignores the Auto Save Timeout for these databases (see Advanced Server Settings). Panorama will automatically use an auto save timeout of 1 second for any web only database, instead of the value set in the Preferences panel. This means that when the code uses the save statement, the save will always occur within 1 second.
See Also
History
Version | Status | Notes |
10.2 | New | New in this version. |