5 Replies Latest reply: Sep 8, 2014 6:02 AM by Alan Houser RSS

    Access MySQL from ExtendScript

    4everJang Community Member

      Did anyone use ExtendScript to connect to a MySQL database, for retrieving and storing data?

        • 1. Re: Access MySQL from ExtendScript
          frameexpert Community Member

          Hi Jang, I have not done this with ExtendScript. I am sure you already know this, but for the record, you can use FrameScript to connect to ODBC databases.

           

          With ExtendScript, you could use XML as an intermediary format between the database and ExtendScript.

           

          Rick

          • 2. Re: Access MySQL from ExtendScript
            4everJang Community Member

            Thanks Rick, but FrameScript is not an option here. And using XML does not solve the problem, as I would need to fire some script from elsewhere to do the pushing and pulling of data. I currently write a series of SQL queries into a text file and have the customer execute the textfile from a PHP script running on their web server. For a localization project I would want to pull little bits of info out of the SQL database on the fly, i.e. using an ExtendScript that might then become event-triggered. The format to exchange info is not changing the need for an active link.

             

            I am investigating sockets. From the CS6 JavaScript Tools Guide, that seems to be the right candidate to make this work. I will keep people posted on my progress. If anyone has used sockets before, please share some working code samples.

             

            Ciao

            • 3. Re: Access MySQL from ExtendScript
              frameexpert Community Member

              Hi Jang, I know Russ Ward has some sample code using the socket object. I am sure he will give you some advice. Rick

              • 4. Re: Access MySQL from ExtendScript
                4everJang Community Member

                Only if he still likes me .

                Hey Russ, what's up? You've been quiet on the forum lately.

                 

                In the meantime I have found some info about the best way to go forward. As the MySQL database will run on the same server that publishes the web help and security issues normally prohibit direct access to that database, I will create some PHP to execute the queries I send to the socket. Should not be too complex, I hope.

                 

                Ciao

                • 5. Re: Access MySQL from ExtendScript
                  Alan Houser Community Member

                  Hi Jang,

                   

                  I am curious about whether you have made any additional progress on FrameMaker database connectivity via Extendscript. I'm attempting to replace/augment an existing FrameScript with an Extendscript implementation, so I'm seeking a similar solution.

                   

                  -Alan