Hello,
I am badly in need of help and it is very urgent.
can someone ppleaseeeeeeeeeeee help
I want to store the result of a resultset in a array,
Eg : i have table tblannotation , n have 3 records with id = 1
and i want to put the result in an array, how can i do that
i.e i want
annoTextArray[1] = "aaaa";
annoTextArray[2] = "bbb";
annoTextArray[3] = "aaaa";
how do i put result of a resultset in an array
pleaseeeeeeeeeeeeee help;
Thanks
Sanam
Class.forName("org.postgresql.Driver");
url1 = "jdbc
ostgresql://192.161.0.0:3333/emo";
con1 = DriverManager.getConnection(url1,"an","jwqek");
stmt1 = con1.createStatement();
sql1 = "select * from tblannotation where id =1";
ResultSet rs1 = stmt1.executeQuery(sql1);
rs1.last();
int rowCount = rs1.getRow();
System.out.println("Row Count : " +rowCount);
while(rs1.next())
{
String[] anoTxt = rs1.getString("annotationtext");
//System.out.println(anoTxt1);
annoTextArray = anoTxt1;
}
[ March 03, 2005: Message edited by: Bear Bibeault ]