Call( function returns result that database is not open when it is


When I run this code:

openfile "Macintosh HD:Sundry docs:Panorama stuff: Panorama X:PanX documentation:StoreRoom.pandb"
message "File is open"
message call("Macintosh HD:Sundry docs:Panorama stuff: Panorama X:PanX documentation:StoreRoom.pandb","test")

The file opens, the “File is open” message appears and I get an error message:

The file paths are copied and pasted so there’s no typing error. Presence or absence of the file name extension makes no difference. The Panorama X folder name begins with a space but I get the same result for other paths with no spaces. Using slash separators instead of colons makes no difference. the presence or absence of a functionvalue statement in the target procedure makes no difference.

Am I doing something wrong or is this yet another example of my machine’s bizarre behaviour?


That may be true for the openfile statement, but the call( function definitely must not include the extension. In fact, the rule is that the extension is NEVER used for referring to a database that is open in memory. This applies to all formulas and statement, not just call(.


I just realized my answer is incomplete. In addition to not including the extension, when referring to an open database you should not include the path either – just the name. So the last line of your procedure should simply be:

message call("StoreRoom","test")


My interpretation of that is that the call( function can only access a database in the same folder - even then, it won’t access a file that’s not open.


It certainly won’t call a procedure in a database that is not open. You must open a database before you can perform any operation with it.

My interpretation of that is that the call( function can only access a database in the same folder

The call( function doesn’t know anything about folders. Neither does any other statement or function that works with open databases – dbinfo(, grabfilevariable(, farcall, etc.

If you have two databases with the same name but in different folders, you cannot open them both at the same time. Panorama only allows one file in memory at a time with a particular name. So all that is needed to reference an open database is the name. It doesn’t matter what folder it came from. (If you try to open a second database with the name of a database that is already open, Panorama will just bring the already open database to the front.)

By the way, this means that you can move a database, or a whole folder of databases, to a different location, even a different hard drive or a different computer, and they will work without having to be modified to account for their new location.


Of course - if the d/b is open, it doesn’t matter where it lives.

Current score: Brain fade - 97, michael - 3


The call function can access ANY OPEN PANORAMA FILE regardless of where it sits on the computer.

Robert Ameeti