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
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.
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