pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problems about ODBC3 datetime
2+ messages / 2 participants
[nested] [flat]

* Problems about ODBC3 datetime
@ 2002-11-21 06:52 Han <zhouhanok@vip.sina.com>
  2002-11-21 14:20 ` Re: Problems about ODBC3 datetime Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 1 reply; 2+ messages in thread

From: Han @ 2002-11-21 06:52 UTC (permalink / raw)
  To: pgsql-odbc

Hi,
	Firstly, I encountered a problem when using SQL_DATE: when I use SQLGetTypeInfo(...,SQL_DATE);
the API returns no record. I debuged the psqlodbc driver and found that the value of the parameter DataType was 91. So I think that the value was changed by the odbc30 Driver Manager. But why don't the psqlodbc add the SQL_TYPE_DATE and other ODBC30 data types support in the array sqlTypes[](in pgtypes.c)?
	Secondly, I wander why returning SQL_DATETIME in function pgtype_to_sqldesctype for the three types--SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP?
    Thanks!!!

	

        
 				

        Han
        zhouhanok@vip.sina.com
          2002-11-21






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Problems about ODBC3 datetime
  2002-11-21 06:52 Problems about ODBC3 datetime Han <zhouhanok@vip.sina.com>
@ 2002-11-21 14:20 ` Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 0 replies; 2+ messages in thread

From: Hiroshi Inoue @ 2002-11-21 14:20 UTC (permalink / raw)
  To: Han <zhouhanok@vip.sina.com>; +Cc: pgsql-odbc

> -----Original Message-----
> From: Han
>
> Hi,
> 	Firstly, I encountered a problem when using SQL_DATE: when
> I use SQLGetTypeInfo(...,SQL_DATE);
> the API returns no record. I debuged the psqlodbc driver and
> found that the value of the parameter DataType was 91. So I think
> that the value was changed by the odbc30 Driver Manager. But why
> don't the psqlodbc add the SQL_TYPE_DATE and other ODBC30 data
> types support in the array sqlTypes[](in pgtypes.c)?

Hmm you seem to be right. I would add SQL_TYPE_DATE, SQL_TYPE_TIME
and SQL_TYPE_TIMESTAMP to sqlTypes[].

> 	Secondly, I wander why returning SQL_DATETIME in function
> pgtype_to_sqldesctype for the three types--SQL_TYPE_DATE,
> SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP?

There are SQL_DESC_TYPE and SQL_DESC_CONCISE_TYPE in ODBC3
and
  If SQL_DESC_CONCISE_TYPE is set to a concise data type other than an
  interval or datetime data type, the SQL_DESC_TYPE field is set to the same
  value and the SQL_DESC_DATETIME_INTERVAL_CODE field is set to 0.

  If SQL_DESC_CONCISE_TYPE is set to the concise datetime or interval data
  type, the SQL_DESC_TYPE field is set to the corresponding verbose type
  (SQL_DATETIME or SQL_INTERVAL) and the SQL_DESC_DATETIME_INTER
  VAL_CODE field is set to the appropriate subcode.

regards,
Hiroshi Inoue




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-11-21 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-21 06:52 Problems about ODBC3 datetime Han <zhouhanok@vip.sina.com>
2002-11-21 14:20 ` Hiroshi Inoue <Inoue@tpf.co.jp>

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