4 Replies Latest reply on Mar 30, 2010 7:27 AM by ajdove

    SalesBuilder errors

    ajdove

      I have started to use the AIR + SQLite application built by Christophe Coenraets. I have commented on a thread at http://forums.adobe.com/message/2689366#2689366 but have not received any reply comments.The SalesBuilder application is a fantastic app which I hope to build upon, however, upon importing the application into Flex Builder 3 I am receiving errors. The biggest error is pointing to the database in SQLite, stating it has too many parameters than expected ... Do I need to create a SQLite instance before running the application? Or will the application build the database on init? I believe it creates a database on the fly and encrypts it too.

       

      Uggh. Any help would be appreciated. Also, are we able to use the SalesBuilder application commercially (given I make modifications) or are there copyright legalities?

       

      Thanks

      Alex Dove

        • 1. Re: SalesBuilder errors
          ajdove Level 1

          I have installed the SalesBuilder version 1 application which does not have the iLog Components nor does it include the SQLite encryption. I am trying to locate the SQLite database so that I can manage the tables. Does the original SalesBuilder v1 application use the SQLite or does it use StoredObjects? I still needs to have the original request answered, however, this optional workaround is a temporary solution. I have downloaded and installed Lita to help manage the SQLite, but I cannot locate the SQLite database used for the SalesBuilder v1 application. Any ideas?

           

          Thanks

          Alex

          • 2. Re: SalesBuilder errors
            ajdove Level 1

            I have installed Lita and created a salesbuilder.db file with the appropriate tables and structure as displayed in the createtables.xml file. I also have saved the salesbuilder.db file into the src folder and to the bin-debug folder within Flex, but I still cannot make a connection to the database. The application continues to use the inherent xml files. The code in the salesbuilder.mxml file relating to the database is as follows:

             

            private var sqlConnection:SQLConnection;
                       
                    private function initApp():void
                    {
                        // Open a connection to the local database. We keep that connection opened and
                        // use it through the course of this application. app-storage:/
                        sqlConnection = new SQLConnection();
                        var file:File = new File("app-storage:/salesbuilder.db");
                        sqlConnection.open(file);
                        SQLConnectionManager.setConnection("salesbuilder", sqlConnection);

             

                        // Create tables if they don't already exist
                        var sqlUtil:SQLUtil = new SQLUtil();
                        sqlUtil.executeBatch(File.applicationDirectory.resolvePath("data" + File.separator + "createtables.xml"), sqlConnection);

             

                        TabManager.tabNavigator = tn;
                        TabManager.openDashboard();
                    }

             

            So, the area that I am looking at in this code is var file:File = new File("app-storage:/salesbuilder.db");

            Where do I save and store the salesbuilder.db file? I do not know what the app-storage:/ location is. Can anyone help?

             

            Thank you

            Alex Dove

            • 3. Re: SalesBuilder errors
              ajdove Level 1

              I am attempting to use your tutorial but running into  complications. I have created the database in SQLite, however, after  saving the salesbuilder.db file and running the Flex application I  receive an error “Unable to open database file …”

               

              Here is my database connection function:

               

              private function initApp():void
              {
              // Open a connection to the local database. We keep that connection  opened and
              // use it through the course of this application. app-storage:/
              // Documents and Settings\Alex Dove\Desktop
              sqlConnection = new SQLConnection();
              var file:File = new File(“C:\Documents_and_Settings\Alex  Dove\Desktop\salesbuilder.db”);
              sqlConnection.open(file);
              SQLConnectionManager.setConnection(“salesbuilder”, sqlConnection);

              // Create tables if they don’t already exist
              var sqlUtil:SQLUtil = new SQLUtil();
              sqlUtil.executeBatch(File.applicationDirectory.resolvePath(“data” +  File.separator + “createtables.xml”), sqlConnection);

              TabManager.tabNavigator = tn;
              TabManager.openDashboard();
              }

               

              Do you see any issues? I have created a single “Account” in the  SQLite database called “Portillos”. Its a groovy hot dog joint in  Chicago. :)

              Any help would be greatly appreciated.
              Thank you.
              Alex Dove

              • 4. Re: SalesBuilder errors
                ajdove Level 1

                I am getting an error "updaterInitializedHandler" on the application...

                 

                Please help

                Alex