PDA

View Full Version : value from database BigInt(20)


BubikolRamios
04-21-2009, 06:35 AM
public String var1= null;
public String var2 = null;
...

public String id_tezaver = null;

connection con = ....
sql ....


this.id_tezaver = String.valueOf(con.rs.getInt("id_tezaver")) ;
//or
this.id_tezaver = con.rs.getString("id_tezaver") ;


if I look at red part with debuger, there is a value like 3328
but this.id_tezaver = null !?
No error. For all the rest variables all works ok, they are read from database from fields of type String , the problematic is BigInt(20) MYSQL.
What to do ?

shyam
04-23-2009, 05:02 PM
Why get an an int and try to convert it to a string when you can simply call getString and be done with it?