OpenDatabase with Shared Database

When I use OpenDatabase on a shared database, do I specify the file location or just the name of the file?

The thing is, on a shared database we can’t know the location because it’s available on different computers. But I’ve been having some errors when leaving off the location when trying to open it.

You have to specify the location. However, if the database you want to open is in the same folder as the current database, then just the file name will work. This is exactly the same as if the file was a single user file. In fact, Panorama doesn’t even find out that the file is shared until it has located the file and brought it into memory.

If you want your code to work properly on different computers, you’ll have to organize how you arrange your databases on the different computers. Typical you’ll put all of the databases that work together in the same folder (whether single user or shared). Or maybe in organized subfolders. If you just randomly splat different databases in different place on each computer, you won’t be able to use the opendatabase statement (but you’d have the same problem for single user databases).