pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris <dmagick@gmail.com>
To: surabhi.ahuja <surabhi.ahuja@iiitb.ac.in>
Cc: pgsql-general@postgresql.org
Subject: Re: date value not geting inserted properly
Date: Thu, 08 Jun 2006 12:35:59 +1000
Message-ID: <44878D0F.6040501@gmail.com> (raw)
In-Reply-To: <8626C1B7EB748940BCDD7596134632BE398687@jal.iiitb.ac.in>
References: <8626C1B7EB748940BCDD7596134632BE398687@jal.iiitb.ac.in>

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/



view thread (4+ messages)

Message-ID: <44878D0F.6040501@gmail.com>
Permalink:  ../44878D0F.6040501@gmail.com/
Also on:    postgresql.org/message-id/44878D0F.6040501@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: dmagick@gmail.com, surabhi.ahuja@iiitb.ac.in, pgsql-general@postgresql.org
  Subject: Re: date value not geting inserted properly
  In-Reply-To: <44878D0F.6040501@gmail.com>
  References: <8626C1B7EB748940BCDD7596134632BE398687@jal.iiitb.ac.in> <44878D0F.6040501@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox