0 Replies Latest reply on Jan 16, 2009 12:32 AM by priyaram1

    Sql Server Database connection issue for flex applications using ADOBE AIR

    priyaram1
      In Flex, an application can be created from database by following the steps as follows:

      STEP 1. Create a new Flex Project and name it as for example, “FLEXDB”. Select the
      application type as “Web Application (runs in Flash Player)” and Application server type as “ASP.Net”.

      STEP 2. Go to Data->Create application from database. Select the project as
      FLEXDB”.Create a new Connection to SqlServer 2005 and specify the database and name that connection as”TestConn”. Then select any table (for example DashboardRegion) from the list of tables and click “Next” button.

      STEP 3. Select the Server language as “C# with Web Services”. Click “Finish”.

      STEP 4. Then the following files and folders will be created under the project “FLEXDB”
      automatically.

      • DashboardRegion.mxml -- is a design page.
      • DashboardRegionScript.as -- defines web service object and capture the results and assigns the results to the corresponding UI Component.
      • DashboardRegionConfig.as -- calls the Web Service file.
      • DashboardRegion.asmx -- calls the Class Files (DashboardRegion.cs file).
      • Web.config – defines the Connection string
      • App_Code is a folder which contains the following files
      o DashboardRegion.cs that interacts with SQL Server 2005 and return the results.
      o TestConn.cs that defines connection to SQL Server 2005.

      STEP 5. Run the application “DashboardRegion.mxml ”.We can see the Database results
      Fetched and displayed in the corresponding UI Component in the output.


      Now we are trying to create a Similar Flex Application using Adobe AIR.
      For this, we have to follow similar steps mentioned as above with a slight modification in STEP 1. It will be as follows:

      STEP 1. Create a new Flex Project and name it as for example, “FLEXDB”. Select the
      application type as”Desktop Application (runs in Adobe AIR)” and Application server type as “ASP.Net”.

      The remaining steps are same as above.

      When we try to run the application “DashboardRegion.mxml”, it is throwing an error saying “DashboardRegion-app.xml” file is missing. To solve this issue we tried creating “DashboardRegion-app.xml” file manually, the application is running but, again throwing an error saying “Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (../DashBoardRegion.asmx?wsdl)”.

      Can any one please suggest a solution for this?