Thread:

From
abhilas@iiitmk.ac.in
Date:
  I am retrieving the values of some positions of a table dynamically.The
position has null(automatically database insert that null value),1,2
values.I have to retrieve that values to a java prog and to check whether
the retrieved value is 1,2 or null.This I am doing like this.
      I reterieves the value using rs1.getString(usrnameDB).

if(rs1.getString(usrnameDB).equals("1"))
else if(rs1.getString(usrnameDB).equals("null"))
   The II line won't work because here the null parameter(entered
automatically in the database)is something different from that is there in
a JAva prog.
  I just want to know how can I check that a retrieved value in this
manner is 1,2 or null.
 Abhilash


---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/



Re:

From
"Guthrie, John"
Date:
look at java.sql.ResultSet.wasNull()

john


-----Original Message-----
From: abhilas@iiitmk.ac.in [mailto:abhilas@iiitmk.ac.in]
Sent: Thursday, July 18, 2002 7:43 PM
To: pgsql-jdbc@postgresql.org
Cc: abhilas@iiitmk.ac.in
Subject: [JDBC]



  I am retrieving the values of some positions of a table dynamically.The
position has null(automatically database insert that null value),1,2
values.I have to retrieve that values to a java prog and to check whether
the retrieved value is 1,2 or null.This I am doing like this.
      I reterieves the value using rs1.getString(usrnameDB).

if(rs1.getString(usrnameDB).equals("1"))
else if(rs1.getString(usrnameDB).equals("null"))
   The II line won't work because here the null parameter(entered
automatically in the database)is something different from that is there in
a JAva prog.
  I just want to know how can I check that a retrieved value in this
manner is 1,2 or null.
 Abhilash


---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)