Re: date value not geting inserted properly

From: Chris <dmagick(at)gmail(dot)com>
To: "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: date value not geting inserted properly
Date: 2006-06-08 02:35:59
Message-ID: 44878D0F.6040501@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

surabhi.ahuja wrote:
> i have a cloumn in my table which is date type
>
> i parse a file to get the date from there,
>
> and then i form a call to the stored procedure, with the above data as
> the parameter.
>
> but however it seems that when i form this call, something is messing
> up, and the value for the birth date, getting into that field is
> "1969-12-31" ,
> and this happens always, it inserts this value only, whtever be the
> input data value.
>
> i am pasting the code that i am trying to do
>
> stmt.setObject(i + 1, (tagV.value),
> ((TypeAttrib) (primaryKeyMap_.get(tMap.get(temp)))).dataType);
>
> can u please tell as to what should the dataType be for date, isnt it
> 91- integer?

No - a date is a date, it's completely different from an integer.

Since this is java, the jdbc list should be able to help you a bit more
than this one.

--
Postgresql & php tutorials
http://www.designmagick.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-06-08 03:09:35 Re: Problem finding libpq.so.4 in PG 8.1.4 RH EL4
Previous Message Shane Ambler 2006-06-08 02:24:15 Re: Problem with 'postgres' db with 8.0 on a MacBook

Browse pgsql-jdbc by date

  From Date Subject
Next Message Daxel Sakasaki 2006-06-08 16:24:28 Insert error
Previous Message surabhi.ahuja 2006-06-07 13:52:59 Re: date value not geting inserted properly