Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: applet only diaplay single row using oracle jdbc

Re: applet only diaplay single row using oracle jdbc

From: Wolfgang Breitling <breitliw_nospam_at_centrexcc.com>
Date: Thu, 01 Apr 1999 14:22:46 GMT
Message-ID: <TcMM2.18984$134.195834@tor-nn1.netcom.ca>


In article <7dupct$5g8$1_at_nnrp1.dejanews.com>, tedchyn_at_yahoo.com wrote: [snip]
> OutputInfo.setText("Executing Query "
+
>AnyQuery + "\n");
> ResultSet rset =
>stmt.executeQuery(AnyQuery);
> //dump the result
> int i = 1;
> while (rset.next()){
> while (i<9){
> OutputInfo.appendText(rset.getString
>(i++) + " ");
> }
> OutputInfo.appendText("\n");
> }
> OutputInfo.appendText("Done\n");
> }
[snip]
try putting the int i = 1; inside the while (rset.next()) loop. After the first row, i is greater than 9 and stays that way:

ResultSet rset = stmt.executeQuery(AnyQuery); //dump the result
while (rset.next()){
  int i = 1;
  while (i<9){
    OutputInfo.appendText(rset.getString(i++) + " ");     }
  OutputInfo.appendText("\n");
  }
OutputInfo.appendText("Done\n"); Received on Thu Apr 01 1999 - 08:22:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US