3 Replies Latest reply on Jul 19, 2008 11:22 PM by atta707

    Flex Database Connection

    Mike_r26
      Hi,

      I am really new to Flex and am not a programmer, but am trying to learn to automate some of my reports, my question is can Flex connect to a MS Access database and can you call to it with an ASP page? I know that flex can use the .NET framework, but was curious if there is a way to set Flex up to talk to a "simple" database via ASP.. I am probably not asking the question correctly. Any comments/suggestions would be greatly appreciated.

      thanks.
      -mike

      (for that matter...is it possible to connect to Flash in the sameway above while authoring in AS3)?
        • 1. Re: Flex Database Connection
          atta707 Level 2
          The most important thing to realize about Flex and it's ability to connect to a database is that i cannot!

          There is nothing in Flex that knows anything about .Net or vice versa!

          Absolutely, Flex can talk to old simple ASP pages. It's entirely upto the ASP page to figure out about how it wants to connect to a database. Once it has retrieved that data from database, all it has to do is to write it to the Response object as, let's say, XML or JSON or what have you.

          Once you have this page and you hit it in the browser and see the appropriate response, you're ready to call it from Flex. In flex you'll use HTTPService class and listen for result and fault events. One you've recieived the data its upto you to display it whichever way you like.

          Yes, of course, you can use the same HTTPService in Flash CS3 to connect to the same page, listen for same result and falut event and get the data.

          ATTA
          • 2. Re: Flex Database Connection
            Mike_r26 Level 1
            Atta,

            Thanks for your reply. I have another quick question...In terms of the result set, is there a way to pass them from the ASP page rather than creating/converting to XML?

            thanks..mike
            • 3. Re: Flex Database Connection
              atta707 Level 2
              Hi Mike,

              Unfortunately, the answer is no! Just like you can't show your result set on an HTML page without iterating it, getting it's properties -- rows and columns -- and converting them them to HTML text for browser to show; there is no way for Flex to understand semantics of a result set.

              Your best bet could be a third party library that quickly converts a result set into more portable XML or CSV or JSON.

              ATTA