4 Replies Latest reply on Jun 13, 2007 3:03 PM by

    AIR SQLConnections


      I have just downloaded Flex 3 and I need develop an Apollo application connects to SQL SERVER. The examples in Chapter 22, page 83, have only samples for accessing a db file.

      Where can I find an example of how to define a connectionstring and connect to my SQL Server. I have noted that the new Builder has a Wizard for creating connections. How can this be used solve my problem ???

      By the way, do you know where can I find a free jdbc driver for SQL Server ???

      Thanks in advance
        • 1. Re: AIR SQLConnections
          The SQLConnection is intended for a local embedded database and can’t be used for anything external to Apollo. You don't need to install any specific driver to use the embedded database.

          • 2. Re: AIR SQLConnections
            mvbaffa Level 1
            Thanks Jorge

            What could it be the wizard to create connections that exists in the Builder 3.0

            Thanks in advance
            • 3. Re: AIR SQLConnections
              Peter Flynn (Adobe) Adobe Employee

              The Data Wizard in Flex Builder 3 is a new feature that helps you get up & running fast when working with a server. The wizard will generate Flex code for your client side and PHP or Java code for your server side, giving you a simple "scaffolding" app to build on top of.

              The DB connection info is needed so that the wizard can introspect your DB tables and generate the appropriate code. I believe the connection info also finds its way into the generated PHP or Java.

              Bear in mind that an architecture where your client directly talks to a remote SQL server often has serious security risks. Using a three-tiered approach where the client's requests pass throuh a server layer, like what the Data Wizard generates, is usually the preferred way to go.

              - Peter
              • 4. AIR SQLConnections
                Hi. Just to clarify, AIR apps can work with SQL Server or any database for that matter using the same techniques you would for any Flex app. That is, write the database queries using the server technology of your choice and expose them as an RPC service that your AIR app can access. LiveCycle Data Services 2.5 has a great feature for this, the SQL Assembler. Or you could use ColdFusion, PHP, ASP.NET, custom Java, or anything that can spit out a web service or even just XML over HTTP. As Peter notes, Flex Builder 3 has a new feature for helping you generate this with a PHP or Java backend, and there are also separate ColdFusion extensions for Flex Builder that help you do the same with CF.