pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
timestamp as varchar(23)
3+ messages / 2 participants
[nested] [flat]

* timestamp as varchar(23)
@ 2008-02-12 12:32  Zubkovsky, Sergey <Sergey.Zubkovsky@transas.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Zubkovsky, Sergey @ 2008-02-12 12:32 UTC (permalink / raw)
  To: pgsql-odbc

Hi,

 

I'm trying to get some "timestamp without time zone" column's value as a
varchar(23) value.

The SQLBindCol() function is used for this purpose in my C++ app.

However the result string doesn't contain milliseconds part at all while
the real column's value contains it ('2007-12-23 10:00:01.123' for
example). 

After SQLFetch() the result's buffer contains '2007-12-23 10:00:01'
only.

The same program works fine with a MSSQLServer database so I cannot
suppose that there is something wrong in my app.

 

OS: WinXP SP2

"PostgreSQL 8.3.0, compiled by Visual C++ build 1400"

ODBC Driver: PostgreSQL Unicode 08.03.01.00

Additional connection string settings:

    ByteaAsLongVarbinary=1; TextAsLongVarchar=1; MaxVarcharSize=8000;
BoolsAsChar=0; BI=-5; LFConversion=0; LowerCaseIdentifier=0;

 

How can I get "milliseconds part" in this case?

 

Thank you.

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

* Re: timestamp as varchar(23)
@ 2008-02-14 00:18  Hiroshi Inoue <inoue@tpf.co.jp>
  parent: Zubkovsky, Sergey <Sergey.Zubkovsky@transas.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Hiroshi Inoue @ 2008-02-14 00:18 UTC (permalink / raw)
  To: Zubkovsky, Sergey <Sergey.Zubkovsky@transas.com>; +Cc: pgsql-odbc

Zubkovsky, Sergey wrote:
> Hi,
> 
> I’m trying to get some “timestamp without time zone” column’s value as a 
> varchar(23) value.
> 
> The SQLBindCol() function is used for this purpose in my C++ app.
> 
> However the result string doesn’t contain milliseconds part at all while 
> the real column’s value contains it ('2007-12-23 10:00:01.123' for 
> example).
> 
> After SQLFetch() the result’s buffer contains '2007-12-23 10:00:01’ only.

could you try the driver on testing for 8.030101 at
	http://www.geocities.jp/inocchichichi/psqlodbc/index.html
?

regards,
Hiroshi Inoue




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

* Re: timestamp as varchar(23)
@ 2008-02-14 12:58  Zubkovsky, Sergey <Sergey.Zubkovsky@transas.com>
  parent: Hiroshi Inoue <inoue@tpf.co.jp>
  0 siblings, 0 replies; 3+ messages in thread

From: Zubkovsky, Sergey @ 2008-02-14 12:58 UTC (permalink / raw)
  To: Hiroshi Inoue <inoue@tpf.co.jp>; +Cc: pgsql-odbc


Yes, it works now!
I hope that the fixed driver will be released ASAP.
Thank you.

-----Original Message-----
From: Hiroshi Inoue [mailto:inoue@tpf.co.jp] 
Sent: Thursday, February 14, 2008 3:18 AM
To: Zubkovsky, Sergey
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] timestamp as varchar(23)

Zubkovsky, Sergey wrote:
> Hi,
> 
> I'm trying to get some "timestamp without time zone" column's value as
a 
> varchar(23) value.
> 
> The SQLBindCol() function is used for this purpose in my C++ app.
> 
> However the result string doesn't contain milliseconds part at all
while 
> the real column's value contains it ('2007-12-23 10:00:01.123' for 
> example).
> 
> After SQLFetch() the result's buffer contains '2007-12-23 10:00:01'
only.

could you try the driver on testing for 8.030101 at
	http://www.geocities.jp/inocchichichi/psqlodbc/index.html
?

regards,
Hiroshi Inoue




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


end of thread, other threads:[~2008-02-14 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-02-12 12:32 timestamp as varchar(23) Zubkovsky, Sergey <Sergey.Zubkovsky@transas.com>
2008-02-14 00:18 ` Hiroshi Inoue <inoue@tpf.co.jp>
2008-02-14 12:58   ` Zubkovsky, Sergey <Sergey.Zubkovsky@transas.com>

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