sqlite - Flash Builder Mobile 4.5用数据SQLite填充列表

  显示原文与译文双语对照的内容
0 0

`

<fx:Script>
 <![CDATA[
 import mx.collections.ArrayCollection;
 import spark.events.ViewNavigatorEvent; 
 protected var sqlConnection:SQLConnection;
 protected function view1_viewActivateHandler(event:ViewNavigatorEvent):void
 {
 sqlConnection = new SQLConnection();
 sqlConnection.open(File.applicationStorageDirectory.resolvePath("euro.db"));
 getAllGiberish();
 }
 protected function getAllGiberish():void
 {
 var stmt:SQLStatement = new SQLStatement();
 stmt.sqlConnection = sqlConnection;
 stmt.text ="SELECT esteso FROM generale GROUP BY nazione, esteso HAVING nazione = 'Austria'";
 stmt.execute();
 list.dataProvider = new ArrayCollection(stmt.getResult().data); 
 } 
 ]]>
</fx:Script>
<s:List id="list" x="4" y="5" width="306" height="274"/>

因为我在名单上没有任何数据? 我做错了什么? generale表 id,valore,moneta,esteso中有 4个字段

时间:原作者:1个回答

0 0

我不是专家,但我首先认为SQL语句可以能是格式错误的,Having 我认为是用于聚合函数。

SELECT esteso FROM generale WHERE nazione = 'Austria' GROUP BY nazione, esteso;

虽然我刚刚注意到这是 Aug,你可能已经对它进行了排序。

Jacko

原作者:
...