1 Reply Latest reply on Jan 14, 2014 5:33 AM by vidkid98

    Getting access privileges error connecting from local to remote db


      I am attempting create a connection between a local and remote database. I have created the target (remote) database and tested it pretty well; logging into it while it is local works as expected. When I move this database to a hosted environment and then connect to it via FMPA or even via webDirect, all is well. No problems accessing the various scripts which write to tables etc under prescribed conditions.


      Next I took a copy of the database and changed all of the table occurences to point to the remote database's tables instead of the local tables. I then deleted the local tables. Again, when this file is accessed, I can do all of the functions I expect when I was accessing the same data through the remote file; except when it comes to writing to an existing record or creating a new record--in these instances regardless of what privilege set I use, even [full access], I get the same error.


      I have confirmed that the remote file permits access to itself via FMP and webDirect. I have not enabled "require full access privileges to access this file" on the hosted database; I have confirmed that I am in the [full access] priv set prior to attempting to perform a script that will write to the remote database (used Data Viewer and get(activeprivilegeset)). I have run out of ideas on why I cannot write to the hosted database from the local file via the external file links.


      Any suggestions or where I should look?





        • 1. Re: Getting access privileges error connecting from local to remote db

          So a few hours later, I found the answer to my problem in the Filemaker documenation (http://www.filemaker.com/11help/html/passwords.13.2.html), the very last paragraph, which says in part...


          Note  If you have a multi-file database solution that includes multiple protected files, you may want to consider using identical account names and passwords in each protected file. When one protected file attempts to access another protected file (such as to access related data or execute a script in the second file), FileMaker Pro initially attempts to open the second file with the same account name and password that was used to open the first file. If there is a matching account name and password, FileMaker Pro skips displaying the account/password dialog box. If there is no matching account, then FileMaker Pro displays the account/password dialog box so the user can enter account information.


          the line above that begins with FileMaker Pro Initially attempts...was the key.  My local app was starting up in Guest access and then I'd request user to login to a registered account.  By merely switching to having the app launch logging in via the Admin account and then re-login to the guest account during the startup process resolved the access privileges errors I was getting. 


          It is curious to note that even though in the original solution I was later logging in as a user with full privileges, because the session's initial log in was through guest privileges, all subsequent access to the remote data was based on the initial login credentials of the guest user.


          I hope this helps others avoid the hours I spent noodling this problem out.  Or, if you have further insight that I missing, please post.