Thanks Mayank it worked..............
"Rastogi, Mayank (CORP, GDC, Patni)" <mayank.rastogi@p...> wrote:You can read the column value once while parsing
through a single record in
a resultset.
Use the code as below:
String strTemp = null;
while(rs.next()){
strTemp = rs.getString("Login");
if(!(strTemp.equals(""))){
out.println(" Login : " + strTemp + "
");
Mayank
-----Original Message-----
From: Danish Z. Aga [mailto:agadanish@y...]
Sent: Wednesday, October 16, 2002 5:40 PM
To: Pro_JavaServer_Pages
Subject: [pro_jsp] JSP QUERY
Hello All,
In the following code :when i run this i get
"org.apache.jasper.JasperException: No data found".................But if i
comment the if loop inside the while i get the correct output as i
need...............so can anyone help me on this..........Thanx in
advance.....
String strSql = "Select Login,City,TType from Users_SPEED" ;
ResultSet rs= stmt.executeQuery(strSql);
if(rs!=null){
while(rs.next()){
if(!(rs.getString("Login").equals(""))){
out.println(" Login : " + rs.getString("Login") + "
");
}
}
}
rs.close();
%>
Danish Z. Aga
i2i Enterprise Ltd.
A4 B Cross Road,MIDC,
Andheri(E),Mumbai-400093.
Tel-8352751/52/56.Extn-2551/2553
---------------------------------
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com
Danish Z. Aga
i2i Enterprise Ltd.
A4 B Cross Road,MIDC,
Andheri(E),Mumbai-400093.
Tel-8352751/52/56.Extn-2551/2553
---------------------------------
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com