Re: Fetching Date and Timestamp values

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Dev Kumkar <devdas(dot)kumkar(at)gmail(dot)com>, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Fetching Date and Timestamp values
Date: 2014-05-14 22:09:43
Message-ID: 5373E9A7.8030503@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 05/14/2014 02:33 PM, Dev Kumkar wrote:
> On Wed, May 14, 2014 at 10:19 PM, Dev Kumkar <devdas(dot)kumkar(at)gmail(dot)com
> <mailto:devdas(dot)kumkar(at)gmail(dot)com>> wrote:
>
> Hi,
>
> Am facing issue while fetching Date and Timestamp values.
>
> GetSqlData call as follows:
>
> SQLGetData(my_stmt, my_col_no, SQL_C_CHAR, taget_var,
> sizeof(taget_var), &my_buff_len)
>
> Above call returns empty value. Am missing anything obivious here?
>
> Driver version - 9.2.1
> Platform - RHEL 64-bit
>
> Regards...
>
>
> Over here the target column's type is SQL_DATE or SQL_TIMESTAMP, and am
> trying to get them as SQL_C_CHAR.
> Just wanted to check if SQL_C_CHAR is the correct and what is the
> standard way to fetch SQL_DATE or SQL_TIMESTAMP.

Google search found this:

http://msdn.microsoft.com/en-us/library/ms714556%28v=vs.85%29.aspx

Search of the source found this (pgtypes.c):

http://git.postgresql.org/gitweb/?p=psqlodbc.git;a=blob;f=pgtypes.c;h=d7bde0ab11863171f17d3a1a534c23a9001c838f;hb=ad2a4aecb4748f8c5280aabf65dae570a9529065

>
> Regards...

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Dev Kumkar 2014-05-14 22:39:57 Re: Fetching Date and Timestamp values
Previous Message Dev Kumkar 2014-05-14 21:49:33 Re: Fetching Date and Timestamp values