久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='g1Gze'></bdo><ul id='g1Gze'></ul>

    <legend id='g1Gze'><style id='g1Gze'><dir id='g1Gze'><q id='g1Gze'></q></dir></style></legend>
    <tfoot id='g1Gze'></tfoot>

    1. <i id='g1Gze'><tr id='g1Gze'><dt id='g1Gze'><q id='g1Gze'><span id='g1Gze'><b id='g1Gze'><form id='g1Gze'><ins id='g1Gze'></ins><ul id='g1Gze'></ul><sub id='g1Gze'></sub></form><legend id='g1Gze'></legend><bdo id='g1Gze'><pre id='g1Gze'><center id='g1Gze'></center></pre></bdo></b><th id='g1Gze'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='g1Gze'><tfoot id='g1Gze'></tfoot><dl id='g1Gze'><fieldset id='g1Gze'></fieldset></dl></div>
    2. <small id='g1Gze'></small><noframes id='g1Gze'>

    3. Adobe Air:為什么 SQLStatement 的 getResult().data 為空?

      Adobe Air: why SQLStatement#39;s getResult().data is null?(Adobe Air:為什么 SQLStatement 的 getResult().data 為空?)
      • <bdo id='oJKvO'></bdo><ul id='oJKvO'></ul>

      • <small id='oJKvO'></small><noframes id='oJKvO'>

          <tbody id='oJKvO'></tbody>
        • <tfoot id='oJKvO'></tfoot>
              1. <legend id='oJKvO'><style id='oJKvO'><dir id='oJKvO'><q id='oJKvO'></q></dir></style></legend>
                <i id='oJKvO'><tr id='oJKvO'><dt id='oJKvO'><q id='oJKvO'><span id='oJKvO'><b id='oJKvO'><form id='oJKvO'><ins id='oJKvO'></ins><ul id='oJKvO'></ul><sub id='oJKvO'></sub></form><legend id='oJKvO'></legend><bdo id='oJKvO'><pre id='oJKvO'><center id='oJKvO'></center></pre></bdo></b><th id='oJKvO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='oJKvO'><tfoot id='oJKvO'></tfoot><dl id='oJKvO'><fieldset id='oJKvO'></fieldset></dl></div>
                本文介紹了Adobe Air:為什么 SQLStatement 的 getResult().data 為空?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                使用 Flash Builder 4.6,我關注 http://www.flex-blog.com/adobe-air-sqlite-example (鏈接好像壞了) 舉個例子,還有一部分代碼這不起作用:

                Using Flash Builder 4.6, I am following http://www.flex-blog.com/adobe-air-sqlite-example (edit: link seems to be broken) as an example, and there is one part of codes that does not work:

                private function resault(e:SQLEvent):void
                {
                    // with sqls.getResault().data we get the array of objects for each row out of our database
                    var data:Array = sqls.getResult().data;
                    // we pass the array of objects to our data provider to fill the datagrid
                    dp = new ArrayCollection(data);
                }
                

                在運行時檢查程序告訴我 sqls.getResult() 返回一個有效的 SQLResult 對象,但它的數據為空.

                Checking the program during runtime gives me that sqls.getResult() returns a valid SQLResult object, but its data is null.

                從我之前的問題 Adobe Air:將 sqlite 的結果 [object Object] 轉換為 String?,看來我是問錯了問題.

                And from my previous question Adobe Air: convert sqlite's result [object Object] to String?, it seems I am asking the wrong question.

                盡管如此,我已經用

                trace(ObjectUtil.toString(sqls.getResult()));
                

                并且我可以看到我從 sqlite 獲得了我的所有內容:

                and I can see that I got all of my content from sqlite:

                (flash.data::SQLResult)#0
                  complete = true
                  data = (Array)#1
                    [0] (Object)#2
                      first_name = "AAA"
                      id = 1
                      last_name = "BBB"
                    [1] (Object)#3
                      first_name = "AAA"
                      id = 2
                      last_name = "BBB"
                    [2] (Object)#4
                      first_name = "qqq"
                      id = 3
                      last_name = "qqq"
                  lastInsertRowID = 0
                  rowsAffected = 0
                

                那么這里發生了什么?我真的必須創建自己的函數來解析我的所有 sqlite 元素,然后自己將它們放入數據提供程序中嗎?是的,我可以做到這一點,但說真的,許多教程都顯示使用:

                So what's going on here? Do I really have to create my own function to parse all of my sqlite elements and then place them in the data provider myself? Yes, I can do that, but seriously, many tutorials have shown using:

                var data:Array = sqls.getResult().data;
                dp = new ArrayCollection(data);
                

                現在,回到問題:sqls.getResult().data 變為空的可能原因是什么?

                Now, back on the question: What might be the possible causes of sqls.getResult().data becoming null?

                推薦答案

                這看起來不像是一個很好的教程(在我看來).在該代碼中,您有一個用于所有正在執行的語句的事件偵聽器.它甚至只有一個執行不同查詢的 SQLStatement.我不知道你的代碼到底出了什么問題,但我很確定原因可以在那里找到.(甚至不要讓我開始使用 Timer 在語句仍在執行時用作延遲.糟糕!).我強烈建議您尋找更好的資源來學習 Flex/AIR/SQLite.

                That doesn't look like a very good tutorial you're following there (in my opinion). In that code, you have one event listener for all the statements that are being executed. It even has just one SQLStatement that executes different queries. I don't know exactly what is going wrong with your code, but I'm fairly certain the cause is to be found there. (And don't even get me started about that Timer used as a delay when a statement is still executing. Yuck!). I strongly suggest you look for a better source for learning Flex/AIR/SQLite.

                您應該簡單地創建一個新的 SQLStatement,或者至少為每個 Statement 執行創建離散的事件處理程序.一個更好的方法是使用 Responder 類,像這樣:

                You should simply create a new SQLStatement, or at least discrete event handlers for each Statement execution. A better way to do this, would be to use the Responder class, like this:

                var stmt:SQLStatement = new SQLStatement();
                stmt.sqlConnection = connection;
                stmt.text = query;
                
                var token:Responder = new Responder(onResult, onFail);
                stmt.execute(-1, token);
                

                不過可以共享 SQLConnection,如果您不介意始終保持與數據庫的連接.

                The SQLConnection can be shared though, if you don't mind keeping the connection to your database open all the time.

                這篇關于Adobe Air:為什么 SQLStatement 的 getResult().data 為空?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Connect to SQLite in Apache Spark(在 Apache Spark 中連接到 SQLite)
                Kafka JDBC source connector time stamp mode failing for sqlite3(Kafka JDBC 源連接器時間戳模式對 sqlite3 失敗)
                SQLite and Flex(SQLite 和 Flex)
                Adobe Air: convert sqlite#39;s result [object Object] to String?(Adobe Air:將 sqlite 的結果 [object Object] 轉換為 String?)
                sqlite amp; flex - insert into if not exists?(sqlite amp;flex - 如果不存在則插入?)
                Saving form fields in a MySQL DB usinf Flex(使用 Flex 將表單字段保存在 MySQL 數據庫中)
                1. <tfoot id='7PV2M'></tfoot>

                  <small id='7PV2M'></small><noframes id='7PV2M'>

                  <i id='7PV2M'><tr id='7PV2M'><dt id='7PV2M'><q id='7PV2M'><span id='7PV2M'><b id='7PV2M'><form id='7PV2M'><ins id='7PV2M'></ins><ul id='7PV2M'></ul><sub id='7PV2M'></sub></form><legend id='7PV2M'></legend><bdo id='7PV2M'><pre id='7PV2M'><center id='7PV2M'></center></pre></bdo></b><th id='7PV2M'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7PV2M'><tfoot id='7PV2M'></tfoot><dl id='7PV2M'><fieldset id='7PV2M'></fieldset></dl></div>
                  <legend id='7PV2M'><style id='7PV2M'><dir id='7PV2M'><q id='7PV2M'></q></dir></style></legend>

                          <tbody id='7PV2M'></tbody>
                          <bdo id='7PV2M'></bdo><ul id='7PV2M'></ul>
                          主站蜘蛛池模板: 欧美激情在线精品一区二区三区 | 麻豆精品国产91久久久久久 | 欧美一区二区三区在线看 | 男人的天堂在线视频 | 久久亚洲一区 | 国产精品日产欧美久久久久 | 伊人二区 | 国产一区亚洲 | 国产精品成人在线 | 黄色av网站免费看 | 国产夜恋视频在线观看 | 日韩免费福利视频 | 69福利影院| 精品欧美乱码久久久久久 | www.国产日本 | 国产精品96久久久久久 | 久久一区精品 | 天天色官网 | 久久久久久久久久久久久久av | 特一级毛片 | 久久精品性视频 | 日韩伦理一区二区 | 国产精品 亚洲一区 | 久久亚洲一区 | 亚洲传媒在线 | 亚洲精彩免费视频 | 久久亚洲国产精品日日av夜夜 | 天天色天天射天天干 | 全免一级毛片 | 亚洲国产精品第一区二区 | 欧美爱爱视频 | 一区二区三区国产精品 | 国产美女在线精品免费 | 成人一区二区三区 | 免费大黄视频 | 色伊人久久 | 日韩视频一区二区 | 国产一区 | 国产露脸国语对白在线 | 欧美日韩视频一区二区 | 国产7777|