Opendatabase statement will not work with an alias for the database name

I discovered recently that the opendatabase statement will not work with an alias. If the parameter is an alias, PanoramaX will return an error message: “Cannot open database “databasename”:“databasename” could not be handled because PanoramaX cannot open files in the “alias” format.”
But openanything database will open the file! The parameter must have the file extension .pandb included in order to work with openanything. I am going to suggest an addition to the help page for the opendatabase statement with this information.

I haven’t tested it, but if opendatabase doesn’t work with an alias, this also probably applies to fileload( and other functions that directly access files via a path. I’ve added a bug report.

I found that OpenAnything does work with an alias if the suffix is included in the alias and in the procedure.

What I haven’t been able to do is to open an alias and prevent the Initialize from running.

OpenAnything uses a completely different API from the other Panorama operations that access files. It’s actually using the same API that the Finder uses to launch a file. So the OpenAnything statement isn’t accessing the contents of the file at all, it’s telling an Apple API to launch the file. The Finder uses this same API when you double click on a file. That API knows how to work with aliases. But the API’s that work with the contents of files don’t know about aliases – to support aliases Panorama has to call a different API first to resolve the alias and fine the original file, then it can access the contents of the file (to open it, load it, etc.).

1 Like

The Bitbucket issue mentioned earlier in this thread has been updated.