Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: applet only diaplay single row using oracle jdbc
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
![]() |
![]() |