one variable for all the sql output

Posted by kdev on Stack Overflow See other posts from Stack Overflow or by kdev
Published on 2010-03-31T00:01:20Z Indexed on 2010/03/31 0:03 UTC
Read the original article Hit count: 255

Filed under:
|

hi everyone

myRs=myStmt.executeQuery("select i_col,col_name from tab_col")
i=0
while (myRs.next()):
    list= myRs.getString("I_COL")+','+myRs.getString("COL_NAME")

i have a jython code to run a sql statement i want to store all the row of the sql into a single variable. I used to list to store the value but its always storing only the single line , so is there is way to append all the rows and keep adding to single variable.

Thanks so much for your help.

© Stack Overflow or respective owner

Related posts about jython

Related posts about sql