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

    <small id='DUSCi'></small><noframes id='DUSCi'>

    1. <tfoot id='DUSCi'></tfoot>

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

        <legend id='DUSCi'><style id='DUSCi'><dir id='DUSCi'><q id='DUSCi'></q></dir></style></legend>

        SQLSTATE 24000 - 游標狀態無效

        SQLSTATE 24000 - Invalid Cursor State(SQLSTATE 24000 - 游標狀態無效)
      1. <tfoot id='5vAD2'></tfoot>

          <tbody id='5vAD2'></tbody>
          • <bdo id='5vAD2'></bdo><ul id='5vAD2'></ul>

                <legend id='5vAD2'><style id='5vAD2'><dir id='5vAD2'><q id='5vAD2'></q></dir></style></legend>

                <small id='5vAD2'></small><noframes id='5vAD2'>

                  <i id='5vAD2'><tr id='5vAD2'><dt id='5vAD2'><q id='5vAD2'><span id='5vAD2'><b id='5vAD2'><form id='5vAD2'><ins id='5vAD2'></ins><ul id='5vAD2'></ul><sub id='5vAD2'></sub></form><legend id='5vAD2'></legend><bdo id='5vAD2'><pre id='5vAD2'><center id='5vAD2'></center></pre></bdo></b><th id='5vAD2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='5vAD2'><tfoot id='5vAD2'></tfoot><dl id='5vAD2'><fieldset id='5vAD2'></fieldset></dl></div>
                • 本文介紹了SQLSTATE 24000 - 游標狀態無效的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我連接到一個 DB2 數據庫并進行以下查詢.我不明白為什么會出現錯誤:無效的游標狀態".

                  I connect to a DB2 database and makes the following query. I don't understand why I get the error: "invalid cursor state".

                  public static void blivPar() {
                              try {
                                  Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
                                  stmt.setMaxRows(1000);
                  
                                  ResultSet drenge = stmt.executeQuery("SELECT * FROM People WHERE sex='M'");
                                  ResultSet piger = stmt.executeQuery("SELECT * FROM People WHERE sex='F'");
                                  drenge.first();
                                  piger.first();
                                  int i=0;
                                  while(drenge.next()) {
                                      while(piger.next()) {
                                          i++;
                                          System.out.print(i);
                                          stmt.execute("INSERT INTO Couples Values ('"+drenge.getString(1) +
                                                  "','" + drenge.getString(2) +
                                                  "','" + piger.getString(1) +
                                                  "','" + piger.getString(2) + "')");
                                      }
                                  }
                              } catch (Exception ex) {
                                  ex.printStackTrace();
                              }
                  
                          }
                  

                  謝謝.

                  推薦答案

                  在 JDBC Javadocs 上找到了 Statement 接口的這個:用于執行靜態 SQL 語句并返回它產生的結果的對象.

                  Found this on the JDBC Javadocs for the Statement interface: "The object used for executing a static SQL statement and returning the results it produces.

                  默認情況下,每個 Statement 對象只能同時打開一個 ResultSet 對象.因此,如果一個 ResultSet 對象的讀取與另一個 ResultSet 對象的讀取交錯,則每個都必須由不同的 Statement 對象生成. Statement 接口中的所有執行方法都會隱式關閉一個 statment 的當前 ResultSet 對象,如果存在打開的對象."請參閱 聲明 javadoc

                  By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists. " see Statement javadoc

                  所以在我看來,如果您希望同時打開兩個結果集,您需要兩個不同的語句.或者您需要完成第一個 ResultSet 的處理并關閉它,以便您可以重新使用 Statement 來創建第二個 ResultSet.

                  So it looks to me like you need two different Statements if you want two ResultSets open at the same time. Or you need to finish processing your first ResultSet and close it so you can re-use the Statement to create the second ResultSet.

                  這篇關于SQLSTATE 24000 - 游標狀態無效的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                  <i id='Oy2i5'><tr id='Oy2i5'><dt id='Oy2i5'><q id='Oy2i5'><span id='Oy2i5'><b id='Oy2i5'><form id='Oy2i5'><ins id='Oy2i5'></ins><ul id='Oy2i5'></ul><sub id='Oy2i5'></sub></form><legend id='Oy2i5'></legend><bdo id='Oy2i5'><pre id='Oy2i5'><center id='Oy2i5'></center></pre></bdo></b><th id='Oy2i5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Oy2i5'><tfoot id='Oy2i5'></tfoot><dl id='Oy2i5'><fieldset id='Oy2i5'></fieldset></dl></div>
                      <tfoot id='Oy2i5'></tfoot>

                        <bdo id='Oy2i5'></bdo><ul id='Oy2i5'></ul>
                          <tbody id='Oy2i5'></tbody>
                        <legend id='Oy2i5'><style id='Oy2i5'><dir id='Oy2i5'><q id='Oy2i5'></q></dir></style></legend>

                            <small id='Oy2i5'></small><noframes id='Oy2i5'>

                            主站蜘蛛池模板: 国产精品a久久久久 | 国产精品久久久久久吹潮 | 欧美一区二区久久 | 黄色免费在线观看网址 | 国产日韩av一区二区 | 日韩影院在线观看 | 亚洲一区二区三 | www.av在线| 亚洲欧美在线视频 | 浴室洗澡偷拍一区二区 | 成年精品 | 久久国产精品久久久久久久久久 | 高清视频一区二区三区 | 一区二区三区观看视频 | 黄色av网站在线观看 | 精品成人一区二区 | 久久青青| 久久国产区 | 亚卅毛片| 中文字幕免费 | 精品欧美一区二区在线观看欧美熟 | 欧美一区二区小视频 | 日本不卡高字幕在线2019 | 亚洲成人av | 99在线国产 | 欧美国产日韩在线观看 | 免费一区二区三区 | 国产精品一区二区三区久久 | 亚洲精品久久久久中文字幕欢迎你 | 黄色毛片在线播放 | 91在线观看网址 | 亚洲欧美在线免费观看 | 久久久蜜桃 | 羞羞色影院| 日韩精品在线观看视频 | 中文字幕免费在线 | 香蕉视频在线播放 | 婷婷久久综合 | 欧美性受xxxx白人性爽 | 欧美一区二区三区在线播放 | 国产精品久久久久久52avav |