retrieving data from column + mysql + problem!!!
please see this code
con = JDBCUtil.getConnection();
System.out.println("Established a connection");
cstmt = con.prepareCall("{call GetPayloadCount()}");
System.out.println("Called SP");
rs=cstmt.executeQuery();
System.out.println("Executed SP");
System.out.println("Column Count = " + rs.findColumn("RowCount") +":" + rs.toString());
System.out.println("Retrieved " + rs.getString(1));
//rowCount=Integer.parseInt(rs.getString("RowCount"));
All the System.out.println works Column Count gives value 1
stil when i try to get the calue of that column
rs.getString(1)
its showing error.
i'm getting sick of this.
even complex storedprocedures executed without any problem and this simple thing is not working
my SP is GetPayloadCount()
CREATE PROCEDURE `GetPayloadCount`()
BEGIN
SELECT count(*) As RowCount FROM payload;
END
i even tried
rs.getString("RowCount")
still its not working

