JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » JDBC/SQL討論區 » Connection Pool  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 如果一個store procedure回傳是兩個table,請問該如何去用Resultset去同時抓取這兩個table??
ajax

Thiago Alves



發文: 675
積分: 3
於 2004-12-15 17:41 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
問題就是標題!!
如果從database丟回的是兩個table時,ResultSet抓到的是第一個table,但是我是否有辦法去抓取第二個回傳的table???
謝謝!!


reply to postreply to post
作者 Re:如果一個store procedure回傳是兩個table,請問該如何去用Resultset去同時抓取這兩個table?? [Re:ajax]
reggie

Java Life



發文: 238
積分: 1
於 2004-12-16 11:18 user profilesend a private message to usersend email to reggiereply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
database丟回兩個table??
是指database有兩個table,要怎麼去抓資料嗎?
如果是的話,在同一個Connection下,再create一個Statment
用這個Statement的ResultSet再抓同一個database的table


reply to postreply to post
愈來愈喜歡吃蘋果了
作者 Re:如果一個store procedure回傳是兩個table,請問該如何去用Resultset去同時抓取這兩個table?? [Re:ajax]
ajax

Thiago Alves



發文: 675
積分: 3
於 2004-12-16 17:34 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
謝謝你的回應!!
不過.你可能誤解我的意思了!!
我的意思是說同一個Statment會回傳兩個table!!
一個Store Procedure會回傳兩個table以上時要如何去處理!!
謝謝!!


reply to postreply to post
作者 Re:如果一個store procedure回傳是兩個table,請問該如何去用Resultset去同時抓取這兩個table?? [Re:ajax]
moszap





發文: 38
積分: 0
於 2004-12-17 00:00 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
1
2
3
4
5
6
7
8
9
10
11
12
cs.execute();
      ResultSet rs1 = cs.getResultSet();
      while(rs1.next()){
        System.err.println(rs1.getString(1));
      }
      
      while(cs.getMoreResults()==true){
        ResultSet rs = cs.getResultSet();
        while(rs.next()){
          System.err.println(rs.getString(1));
        }
      }


reply to postreply to post
作者 Re:如果一個store procedure回傳是兩個table,請問該如何去用Resultset去同時抓取這兩個table?? [Re:ajax]
ajax

Thiago Alves



發文: 675
積分: 3
於 2004-12-18 01:28 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
謝啦!!
API還是得看熟一點!!
感恩啦!!


reply to postreply to post
作者 Re:如果一個store procedure回傳是兩個table,請問該如何去用Resultset去同時抓取這兩個table?? [Re:ajax]
kowala





發文: 7
積分: 0
於 2005-03-22 18:26 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
可不可以用
VIEW 作看看


reply to postreply to post
我是菜鳥,請多多照顧啦...
作者 Re:如果一個store procedure回傳是兩個table,請問該如何去用Resultset去同時抓取這兩個table?? [Re:ajax]
ajax

Thiago Alves



發文: 675
積分: 3
於 2005-03-22 18:34 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
答案就是>>>>getMoreResults();
ajax.chien


reply to postreply to post
» JWorld@TW »  JDBC/SQL討論區 » Connection Pool

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8