Re: date value not geting inserted properly

Поиск
Список
Период
Сортировка
От surabhi.ahuja
Тема Re: date value not geting inserted properly
Дата
Msg-id 8626C1B7EB748940BCDD7596134632BE398688@jal.iiitb.ac.in
обсуждение исходный текст
Ответ на date value not geting inserted properly  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
Список pgsql-jdbc
yes that is an Object type.
i figued out the problem,
the value was something like "yyyymmdd"
so i needed to convert it to a date type and then do a setObject.
 
thanks,
regards
Surabhi


From: Oliver Jowett [mailto:oliver@opencloud.com]
Sent: Wed 6/7/2006 6:00 PM
To: surabhi.ahuja
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] date value not geting inserted properly

***********************
Your mail has been scanned by InterScan VirusWall.
***********-***********


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 по дате отправления:

Предыдущее
От: Jan de Visser
Дата:
Сообщение: Re: PostgreSQL XA & EJB container
Следующее
От: Daxel Sakasaki
Дата:
Сообщение: Insert error