Re: date value not geting inserted properly - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: date value not geting inserted properly
Date
Msg-id 4486C6F1.7070408@opencloud.com
Whole thread Raw
In response to date value not geting inserted properly  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
List pgsql-jdbc
surabhi.ahuja wrote:

> 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?

java.sql.Types.DATE is 91, which should be correct if you're inserting a
bare date (with no time part).

What is the type and value of the "tagV.value" object?

What driver version and server version are you using?

What is the query you are executing?

Can you provide a selfcontained testcase showing the problem? You
haven't really given us enough info to go on here.

-O


pgsql-jdbc by date:

Previous
From: "surabhi.ahuja"
Date:
Subject: date value not geting inserted properly
Next
From: Jan de Visser
Date:
Subject: Re: PostgreSQL XA & EJB container