Problem with Date fields while fetchin back

i m having a problem with dates less that 01-01-1945, i am using Websphere 6.0 application server and DB2 databast, when i insert a date , then it is getting inserted fine but while fetching back it is gving me null, it worked fine with Websphere 5.0. The same problem persista in Tomcat 4.1 & Tomcat 5.5 also. Any direction will be greatly helpfull.....

[365 byte] By [Funnya] at [2007-10-3 3:39:48]
# 1
If it returns null then it is not inserting properly.
cotton.ma at 2007-7-14 21:35:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
The value is getting inserted, but it is not fetching it properly. even as you say the value is not getting inserted then also it is a problem for me how to deal with that. the value is coming till the query ..........
Funnya at 2007-7-14 21:35:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

> The value is getting inserted, but it is not fetching

> it properly.

I have many doubt about it.

> even as you say the value is not getting inserted

> then also it is a problem

Perhaps the field will not accept a date earlier then the one you are describing. I would look into that.

cotton.ma at 2007-7-14 21:35:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
it would be great if you show us some part of your code in inserting files and retrieving it so we can see the problem is :)
Joraha at 2007-7-14 21:35:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5

here are my insert and fetch SQL query statements, i m using prepared statements

insert

strInsertQuery = INSERT INTO TDV_USER(" +"MEMBER_ID,"+"USER_ID,"+"TITLE,"+

"FIRST_NM,"+

"MI,"+"LAST_NM,"+

"DOB"+

" VALUES(?,?,?,?,?,?,?)"

stmt=conn.prepareStatement(strInsertQuery);

i=stmt.executeUpdate();

select query

strQueryProgram= "SELECT "+"MEMBER_ID,"+"USER_ID,"+"TITLE,"+"FIRST_NM,"+"MI,"+"LAST_NM,"+"DOB from tdv_user" ;

objPreparedStatement=conn.prepareStatement(strQueryProgram);

rs=objPreparedStatement.executeQuery();

hope this will help a bit to trace the error i m facing

Funnya at 2007-7-14 21:35:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6
It doesn't help in the least. You haven't show what values you are setting.At any rate I still think you should talk to your DBA about what values that column can actually store.
cotton.ma at 2007-7-14 21:35:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7

here is what i set into the query

for select

userVO = new UserVO ();

iCount = 1;userVO.setStrMember_Id(rs.getString(iCount++));userVO.setStrUserId(rs.getString(iCount++));

userVO.setStrTitle(rs.getString(iCount++));userVO.setStrFirst_Nm(rs.getString(iCount++));

userVO.setStrMI(rs.getString(iCount++));

userVO.setStrLast_Nm(rs.getString(iCount++));

userVO.setStrGender(rs.getString(iCount++));

userVO.setDtDOB(rs.getDate(iCount++));

for insert

stmt.setString(iCount++,objUserVO.getStrMember_Id());stmt.setString(iCount++,objUserVO.getStrUserId());

stmt.setString(iCount++,objUserVO.getStrTitle());

stmt.setString(iCount++,objUserVO.getStrFirst_Nm());

stmt.setString(iCount++,objUserVO.getStrMI());

stmt.setString(iCount++,objUserVO.getStrLast_Nm());

stmt.setString(iCount++,objUserVO.getStrGender());

if(objUserVO.getDtDOB()!=null)stmt.setDate(iCount++,new java.sql.Date(objUserVO.getDtDOB().getTime()));

else

stmt.setDate(iCount++,null);

Funnya at 2007-7-14 21:35:18 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...