Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

"Open Database" Script results in Access Error

Featured Replies

  • Newbies

I'm having a problem at a customer. He uses a professional FileMaker database with a FileMaker Server and FileMaker Client 5.5, both on Mac OS X 10.3. I (poorly) don't know, what's happening in this database.

When the user opens the database with the Hosts-Menu, everything works well. I wanted to make it easier for the customer to open the database with an AppleScript, so that he does not have to use the way with Open-Menu, click Hosts and than look in the list of databases for the correct one.

This script looks like this:

tell application "FileMaker Pro"

open database "userdatabase.fp5"

end tell

But what happens if I use this one, is that I get an access problem in one of the databases (userdatabase.fp5 is not only one database, but is the menu-database). I get an error, that I cannot modify the database because I do have only read access or the database is protected.

I tested it on several machines with different FileMaker-versions: It happens definitely with using the script.

Has anyone an idea what's happening here?

Thanks

Jurinicia:

Welcome to the Forums.

You've got the right idea, but the wrong implementation. What you want to do is use an Opener File. There are a number of threads regarding this on the Forums, but I'll summarize for you.

On the client machine, create an FMP file. In this file, create a script. In the script, put the command:

Open ["userdatabase.fp5]

(In the dialog, navigate via Hosts to your hosted database & select it)

You can also add the command:

Close []

Which will close the file calling the script.

In preferences->File, tell the file to run the script on startup. Now, put the file somewhere so the user will double-click on that file instead of on the FMP icon (the right-hand side of the dock, for example) and when they open the file, it will take them directly to the hosted db.

There's alot more that can be done in an opener (error capture, for example), but that is the basic idea.

-Stanley

  • Author
  • Newbies

Thank you for the answer Stanley.

The idea is a very good one, but not the answer for my question. For me it is important to understand, what happens and why the script produces an error in database access.

The script does not do any special or irregular, it works like it is documented for AppleScript.

May be anyone has an explenation for the behaviour?

Thank you

Jurinicia:

If I understand right, you are attempting to open a file which is hosted on the server, but you want to open it directly via AppleScript. The message you are getting is that the file will be read-only, right? It sounds to me like you are encountering a permissions problem which, considering that you are accessing a server directly, is what you should expect to happen.

However, this is NOT the proper way to open a database which is being hosted by FileMaker Server. Opening such a file this way will corrupt the data and ruin your files. You are best off doing what I suggested in my previous post, which is to construct a simple opener file in FileMaker.

Just for the academic point, though, to do what you are asking, go to the file in question and change its permissions, and you should no longer get the error message.

-Stanley

  • 1 month later...

If you look at FileMaker's Applescript dictionary, you'll find the syntax:

getURL "fmp7://UserName:Password@IPAddress/MyFile.fp7"

This should help you out.

If you look at FileMaker's Applescript dictionary, you'll find the syntax:

getURL "fmp7://UserName:Password@IPAddress/MyFile.fp7"

This should help you out.

If you look at FileMaker's Applescript dictionary, you'll find the syntax:

getURL "fmp7://UserName:Password@IPAddress/MyFile.fp7"

This should help you out.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.