The opensecret statement opens a database invisibly, without opening its windows.
Parameters
This statement has one parameter:
database – identifies the database you want to open. If the database is not in the same folder as the current database, you must specify the entire path name in addition to the file name.
Description
The opensecret statement opens a database without opening any windows or launching the .Initialize
procedure. It’s useful if a procedure needs to access a database, but the user doesn’t need to see what’s inside.
This example opens a database called Shipping Rates, but does not open any of the windows for that database. It then looks up a rate from the table.
opensecret "Shipping Rates"
Shipping= lookup("Shipping Rates",Zone,Zip[1,3],Rate,0,0)
A database which has been opened secretly with the opensecret statement is not immediately active. It can be made so with the setactivedatabase statement, as in:
opensecret "Income"
setactivedatabase "Income"
Another way is to use the window statement like this:
opensecret "Income"
window "Income:secret"
It then remains the active database until the procedure ends, until another setactivedatabase statement activates another database or until the visible window changes, such as when a message or alert is triggered. The use of the save statement has the same effect.
See Also
History
Version | Status | Notes |
10.0 | No Change | Carried over from Panorama 6.0. |