1. #11
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Exclamation SQLite version - Air version ??

    SQLite version - Air version ??


    Hello Makana,

    Thank you for your input. When using 2 it signals the relational database to sort by #2. This si within the table structure and references the column_id.

    I'm still getting the same issue, and the onyl thing I can think of is what version of SQLite are you using.

    I started up the SQLite Manager and I see version 3.6.16.1. This is just about the only thing I can think of. Otherwise, I'm going to shutdown this old cow struggling to run aptana.

    Also, Makana, can you tell me which version of Air you are running? I'm running Beta 2.0. But if one of my comboxes has not problem accessing SQLite, and don't see the relation, but nonetheless, good to know what versiosn we are running.

    Thanks for your assitance.

    Jackl

  2. #12
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Question SQLite Store - views/tables and rowid?

    SQLite Store - views/tables and rowid?


    Hello,

    So I'm still unable to query the views I've created in my SQLite database. After some searching, I've ntoiced tha tthe only difference between a table and a view is that SQlite adds a system rowid. Could this play a role?

    Also, could some some please explain what Ext means by this :

    /**
    * @class Ext.sql.SQLiteStore
    * @extends Ext.data.Store
    * Convenience class which assists in setting up SQLiteStore's.
    * This class will create the necessary table if it does not exist.
    * This class requires that all fields stored in the database will also be kept
    * in the Ext.data.Store.

    */

    Thanks Jack

    ps - driving to have a view based combobox by weeks' end.

  3. #13
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Question


    Hello All,

    I've added the row id to my view, removed the createTable function and still nothing:
    I simply keep getting the following:

    Code:
    ReferenceError: Error #1056: Cannot create property stackTrace on flash.errors.SQLError.
     at app:/lib/ext/ext-all-debug.js : 32265
     at app:/lib/ext/ext-all-debug.js : 58267
     at app:/lib/ext/ext-all-debug.js : 58349
     h at app:/lib/ext/ext-all-debug.js : 2646
     undefined at undefined : undefined
    This suggests that SQLiteStore load action doesn't like something about the store a params?

    Code:
    load : function(options) {
            options = options || {};
            this.storeOptions(options);
            if(this.sortInfo && this.remoteSort){
                var pn = this.paramNames;
                options.params = options.params || {};
                options.params[pn.sort] = this.sortInfo.field;
                options.params[pn.dir] = this.sortInfo.direction;
            }
            try {
                return this.execute('read', null, options); // <-- null represents rs.  No rs for load actions.
            } catch(e) {
                this.handleException(e); // line 32265
                return false;
            }
        }
    I guess I'm run ning out of ideas here. And the sad part is that its holding up my entire development.

    Thanks in advance for all thoise who can help.

    Jack

  4. #14
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    I saw the same error in my program some time ago. But I can't remeber how I fixed it. Post your SQLiteStore code. And try to debug your app - maybe there is a SQL-error...

  5. #15
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Default


    Hello Pranke,

    Its the same declaration as in the modified ext-air-debug created by Makana. My store is declared as:

    Code:
    store: new Ext.sql.SQLiteStore({
                         conn: iApplication.module.DB
    					,api:{create:false,update:false,destroy:false}
    					,tableName: 'VW_COUNTRY_ADMINS'
    					,key: 'ADMINISTRATOR_ID'
    					,fields: [{name: 'id', type: 'string', mapping:'ADMINISTRATOR_ID'}
                              	 ,{name: 'text', type: 'string',mapping:'ADMINISTRATOR_NAME'}
                        ]
          })
    We should be sure that this works with views, otherwise we can't say that SQLiteStore supports access to views:

    SQlite Version: 3.6.16.1

  6. #16
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    Where is the SQLite version from? You don't need to install anything, but Adobe Air. How are you creating the iApplication.module.DB ?
    And what about the debugging? Are the generated SQL-commands okay?

  7. #17
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Default


    Hello Pranke,

    I have 3 other comboboxes that are using stores such as this one. The only difference is that they are based on views.

    When I keep on debuging and the next this is the dailing line 58267 whihc points once again to the load method:

    Code:
    }else{
                        this.store.baseParams[this.queryParam] = q;
                        this.store.load({
                            params: this.getParams(q)
                        });
    And the final part points to the combobox's triggerAction property

    Code:
    onTriggerClick : function(){
            if(this.readOnly || this.disabled){
                return;
            }
            if(this.isExpanded()){
                this.collapse();
                this.el.focus();
            }else {
                this.onFocus({});
                if(this.triggerAction == 'all') {
                    this.doQuery(this.allQuery, true);
                } else {
                    this.doQuery(this.getRawValue());
                }
                this.el.focus();
            }
        }

    Still nothing. All this is not a problem went the its actually a table and not a View. I'm using SQLiteManager Add-On from Firefox.

  8. #18
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    "Error #1056: Cannot create property stackTrace on flash.errors.SQLError."
    As you see, it is an sql-error. So I don't think the problem is the ext.js.
    What IDE are you using for debugging? Run your application in debug-mode and you will see, where the error occurs and what the SQL-Error exactly is. I think you will also see the generated sql command, which causes the error!

  9. #19
    Sencha User
    Join Date
    Apr 2008
    Posts
    330
    Vote Rating
    0
    Jack_S is on a distinguished road

      0  

    Exclamation SQLiteStore - Doesn't recognize VIEWS in SQLite DB

    SQLiteStore - Doesn't recognize VIEWS in SQLite DB


    Hello All,

    I think that there is something wrong with the SQLiteStore when it comes to accessing a VIEW. It simply does not recognize it.

    Here is how to reproduce the errors I've been getting :

    Code:
    iApplication.module.comboAdmins = Ext.extend(Ext.form.ComboBox,
    {
      initComponent: function()
      {
        Ext.apply(this, {
          store: new Ext.sql.SQLiteStore({
                         conn: iApplication.module.DB //or use dbFile - up to you
    					,api:{create:false
    					     ,update:false
    						 ,destroy:false
    				    }
    					,tableName: 'vw_admins'
    					,key: 'id'
    					,fields: [{name: 'id', type: 'int'}
                              	 ,{name: 'text', type: 'string'}
                        ]
          }),
           valueField: 'id'
          ,displayField: 'text'
          ,triggerAction: 'all'
          ,emptyText:'Select Employee...'
          ,width: 160
          ,fieldLabel: 'Employee'
          ,lazyRender: true
        })
    	  iApplication.module.comboAdmins.superclass.initComponent.apply(this, arguments);
    	}
    });
    Ext.reg('combo-admins', iApplication.module.comboAdmins);
    Now for the SQL Tbale and views:
    Code:
    CREATE TABLE "ORI_ADMINISTRATORS" ("ADMINISTRATOR_ID" INTEGER,"ADMINISTRATOR_NAME" TEXT,"ADMINISTRATOR_TYPE" TEXT);
    
    insert into ORI_ADMINISTRATORS values (1,'Jack Johnson','DATABASE');
    insert into ORI_ADMINISTRATORS values (2,'Jamal Stevens','DATABASE');
    insert into ORI_ADMINISTRATORS values (3,'Tom Brown','ONLINE');
    insert into ORI_ADMINISTRATORS values (4,'Peter Smit','DATABASE');
    
    CREATE VIEW "vw_admins" AS  SELECT ADMINISTRATOR_ID as 'id', ADMINISTRATOR_NAME as 'text' FROM ORI_ADMINISTRATORS WHERE ADMINISTRATOR_TYPE = 'DATABASE' ORDER BY UPPER(ADMINISTRATOR_NAME);
    The just add xtype:'combo-admins' to any panle and you should get the following error:

    Code:
    ReferenceError: Error #1056: Cannot create property stackTrace on flash.errors.SQLError.
    
     at app:/lib/ext/ext-all-debug.js : 32265
    
     at app:/lib/ext/ext-all-debug.js : 58267
    
     at app:/lib/ext/ext-all-debug.js : 58349
    
    h at app:/lib/ext/ext-all-debug.js : 2646
    
    undefined at undefined : undefined
    After getting this error, it basically suggests that the recordset rs is null and therefore no recordset exists for the load action.

    IDE: Aptana 2.0
    Air: 2.0 Beta
    SQlite: 3.6.16

    Thanks Jack

  10. #20
    Sencha Premium Member
    Join Date
    Oct 2009
    Location
    Germany
    Posts
    330
    Vote Rating
    1
    PranKe01 is on a distinguished road

      0  

    Default


    Aptana has great debugging features. Why don't you just run the debugger and check, which sql-command is generated and which error is thrown?
    Set a breakpoint on line 33193 of the ext-all-debug.js. On line 33204 look what's inside the variable "e".

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."