4 Replies Latest reply on Feb 22, 2012 10:14 AM by alexandreriva

    External database conection

    alexandreriva

      Title

      External database conection

      Post

      I have a database store in a server (using FM PRO Server), where many users access this file in our network.

      At this moment, I'm creating a new file to store receipts (Receipts.fps). I want to relate this file to the main file (Main File.fps).

      My question is: how should I relate this file using the external database?

      A) Using a remote conection

      B) Closing all databases, logging in to the server, opening the main file and set up an external conection with the receipts file

      C) Another way?

      Thank you,

        • 1. Re: External database conection
          philmodjunk

          Will this file also be hosted by server or will it be on your local machine?

          Assuming it will be hosted by server as well...

          Easiest way is to host the machine from server and then when you add an external data source reference in either file to link it to the other (Most likely by adding a new table occurrence in one file that refers to a table in the other), simply use open remote to find and and connect to the other hosted file.

          Safest way, is to put a copy of the hosted file in the same folder as your current copy of the new file, create the links and then put the two files back up on the server. (Copy the original file over only if you modified its design by adding an external data source reference.)

          Either way, you'd add a table occurrence with a new external data source reference like this:

          Open Manage | Database | Relationships

          Click the button in the bottom far left corner of this window.

          In the dialog that pops up, select "Add FileMaker Data Source" from the data source drop down. Use the open file dialog that now opens to find and select the file that contains the table for which you want to create an occurrence, clicking the remote button to find the hosted copy on the server if that's what you want. Once you have created once such reference, you can use it to create additional occurrences to any table in the other file without needing to use the open file dialog to find and connect to it again. You can also edit/add/delete external data source references in Manage | external data sources.

          Doing this from copies on your development machine is a little bit safer because if you were to commit such structural changes to your hosted file and be so unlucky as to experience a network glitch at the same exact moment, you can get a damaged file.

          • 2. Re: External database conection
            alexandreriva

            Thanks Phil.

            The file is hosted in the server. EVerything is working.

            Now I need to know how to pretect this file, assuming I have multiple users. Every user have a different username and password. When a user tries to open a layout with references to this external file, FM will ask for a username and password. Is it possible to set up this information once, so that users don't have to type in this information everytime?

            Thanks,

            • 3. Re: External database conection
              philmodjunk

              If you use manage security in both files to create identical account names with identical passwords in each file, references to the second file will not trigger a password log in. When a reference to a file opens it, FileMaker first tries to open it with the current file's account and password, then resorts to the password log in if that fails.

              Another option is to use File Options to set the second file to always open with the same password. This will work only if all your users will need the same level of access to data from the second file. To open such a file with a full access password when you need to change it's design, hold down the option (mac) or shift (windows) key while opening the file and you'll get the standard password log in.