Thread: Help for java
I need help about connections Java program to Postgres databases, I have installed both, but I can't connect the database. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
There is lots of good general information available on the 'net Check out the PostgreSQL web site at: http://www.postgresql.org and Sun's Java Tutorial page at : http://java.sun.com/docs/books/tutorial/jdbc/ Have Fun, John L. Gabriel García wrote: > > I need help about connections Java program to Postgres databases, I have > installed both, but I can't connect the database. > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
hello. it seems that a null value in an integer (int4) column gets converted to zero at some point...is this accurate? i look in the db and see null (queried using IS NULL to make sure), but i call an rs.getObject(colName) and get a java.lang.Integer with a value of zero...is this in jdbc or java? an Integer can BE null, but it cannot have a value of null... didn't see anything in the archives... thanks chris
At 10:59 06/04/01 -0400, chris markiewicz wrote: >hello. > >it seems that a null value in an integer (int4) column gets converted to >zero at some point...is this accurate? i look in the db and see null >(queried using IS NULL to make sure), but i call an rs.getObject(colName) >and get a java.lang.Integer with a value of zero...is this in jdbc or java? >an Integer can BE null, but it cannot have a value of null... I'll check the specs. IIRC getObject on a null'ed field should return null, but I have a feeling this question came up recently (well a few months ago). >didn't see anything in the archives... Whew, someone who has looked at them ;-) Peter >thanks >chris > > >---------------------------(end of broadcast)--------------------------- >TIP 6: Have you searched our list archives? > >http://www.postgresql.org/search.mpl
That is correct. This behavior is supposed to go away in 7.1 chris markiewicz wrote: > > hello. > > it seems that a null value in an integer (int4) column gets converted to > zero at some point...is this accurate? i look in the db and see null > (queried using IS NULL to make sure), but i call an rs.getObject(colName) > and get a java.lang.Integer with a value of zero...is this in jdbc or java? > an Integer can BE null, but it cannot have a value of null... > > didn't see anything in the archives... > -- Joseph Shraibman jks@selectacast.net Increase signal to noise ratio. http://www.targabot.com