2 Replies Latest reply on Jan 14, 2016 8:12 AM by MrBond

    Working with files which are saved as a path in MySQL

    MrBond

      Hi!

       

      How can I access files, which are saved as a path in a textfield in MySQL? I have access to that MySQL field via ODBC. In that specific field I have a path to a file. Now I want to access this file via FileMaker. For example a preview of a PDF file. Is that possible?

       

      Thanks!!

        • 1. Re: Working with files which are saved as a path in MySQL
          APIcoder

          You can connect with ODBC ,

           

          goto      Manage Database ->

          goto      Tables / Relationships ->

          select   Add ODBC Data source ->

          Choose Data Source Name

          The TO is placed and a new (ODBC) Layout is created.

           

          Create a Script

          Goto layout [ Layout_with_odbc_table ]

          set variable [ $_PATH = "file:/path/to/folder/" & (odbc_table::fieldname_with_path) ]

          Goto layout [ Layout_with_container ]

          Insert File[ table_container::containe, $_PATH ]

           

          If the files are not on your Computer then change path to FTP Volumes

           

          Or on a Mac

          Command k

          Than input path to FTP Server ( UserName & Password )

           

          Adjust your Script

          Goto layout [ Layout_with_odbc_table ]

          set variable [ $_PATH = "filemac:/public_html/" & odbc_table::fieldname_with_path

          Goto layout [ Layout_with_container ]

          Insert File[ table_container::containe, $_PATH ]

           

          It is possible you web dir. "public_html" has another name

           

          ( Or download with curl ( AppleScript / PHP )

          • 2. Re: Working with files which are saved as a path in MySQL
            MrBond

            Hi!

             

            Thanks, I'm sure that will work.