dcsimg
checking whether re.getString is null of not pls help urgent...!!!
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bhargav_M
Posted On:   Tuesday, May 7, 2002 03:17 AM

hello friends, i am querying oracle table with preparedStatement ie PrepareStatement pstmt; ResultSet rs; pstmt = conn.prepareStatement("select * from test"); rs = pstmt.executeQuery(); while(rs.next()) { name = rs.getString(1) age = rs.getInt(2) } now suppose if the statement name = rs.getString(1) returns me a null or the name value is set null then can i check it like this :- if(name.equals(null) == true) name = " "; psl help me ... urgently... thank u sooo much. bhargav    More>>

hello friends,



i am querying oracle table with preparedStatement ie

PrepareStatement pstmt;

ResultSet rs;

pstmt = conn.prepareStatement("select * from test");

rs = pstmt.executeQuery();



while(rs.next())

{

name = rs.getString(1)

age = rs.getInt(2)

}


now suppose if the statement name = rs.getString(1) returns me a null or the name value is set null then can i check it
like this :-


if(name.equals(null) == true)

name = " ";




psl help me ... urgently... thank u sooo much.



bhargav

   <<Less

Re: checking whether re.getString is null of not pls help urgent...!!!

Posted By:   Bozidar_Dangubic  
Posted On:   Tuesday, May 7, 2002 03:36 AM

no. check with if(name==null).
About | Sitemap | Contact