5 Replies Latest reply on Sep 14, 2007 8:22 AM by B-boy

    Mysql connection help

      I am a newbie to flex. I am using the flex 3 beta. I used the connection wizrd to connect to a mysql database on a remote server. My workspace also resides on this remote server also. I run the application generated by the Connection app but I get a message saying "Connection Error: Null". And no data displayed in my grid.
      Prior to this point I did have a problem with the data type for the Key field, but I found an acceptable type and was able to work past that in the data wizard.
      Thank you for any and all help.
        • 1. Re: Mysql connection help
          JoshBeall Level 1
          I'm not sure you can use the connection wizard to connect directly to MySQL. Perhaps someone else can clarify that point?

          Regardless, it's generally just a better idea to hide your database details behind an API of some kind. In this case, that would mean a web services API that acts as a gateway between your Flex app and MySQL
          • 2. Re: Mysql connection help
            widgeter Level 1
            I would suggest setting up "AMFPHP" for accessing a MySQL DB. If you need more help, just ask. Its pretty easy to setup and get an example working using their service browser.... There is also WebOrb but I haven't used that yet.

            Matt M.

            • 3. Re: Mysql connection help
              catalinanastasoaie Level 1
              Hi B-boy,

              Can you give us more details on how exactly did you use the database connector?
              Have you used the php with rest method to connect to a mysql server? If yes make sure that you have php installed on the webserver that you are using and that you have access rights to the mysql server.

              • 4. Re: Mysql connection help
                Peter Flynn (Adobe) Adobe Employee
                The wizard B-boy is talking about is a new Flex Builder feature that generates this basic server-side API for you. It also generates a sample Flex app (like scaffolding) that talks to this API.

                There are several ways you can diagnose this problem further...
                * Use a browser to directly visit the URL that the generated server-side code is running at. This way you can see whether the URL is correct and is returning good data.
                * Add trace code to fillHandler() in the generated Script.as file on the client. Use Debug to see messages printed by trace().

                Hope that helps,

                - Peter
                • 5. Re: Mysql connection help
                  B-boy Level 1
                  Thanks all for the help. I will take your suggestion Peter and follow that path. Also I will lookinto amfphp. I hear there is a new vers . alot faster. I believe it is vers 1.9

                  Again thanks