pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Dev Kumkar <devdas.kumkar@gmail.com>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: Fetching Date and Timestamp values
Date: Wed, 14 May 2014 15:09:43 -0700
Message-ID: <5373E9A7.8030503@aklaver.com> (raw)
In-Reply-To: <CALSLE1NtT=nUGJ2d9K3tZJ0-O28RHU+vJDpFqDM5gb7Yo2c2=A@mail.gmail.com>
References: <CALSLE1OZxgaVrvudOnqOvSxf=b-UZUkDT-90-+4Brt71OjrSUg@mail.gmail.com>
	<CALSLE1NtT=nUGJ2d9K3tZJ0-O28RHU+vJDpFqDM5gb7Yo2c2=A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 05/14/2014 02:33 PM, Dev Kumkar wrote:
> On Wed, May 14, 2014 at 10:19 PM, Dev Kumkar <devdas.kumkar@gmail.com
> <mailto:devdas.kumkar@gmail.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=d7bde0ab11863171f17d3a1a534c23...

>
> Regards...


-- 
Adrian Klaver
adrian.klaver@aklaver.com


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



view thread (11+ messages)  latest in thread

Message-ID: <5373E9A7.8030503@aklaver.com>
Permalink:  ../5373E9A7.8030503@aklaver.com/
Also on:    postgresql.org/message-id/5373E9A7.8030503@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: adrian.klaver@aklaver.com, devdas.kumkar@gmail.com
  Subject: Re: Fetching Date and Timestamp values
  In-Reply-To: <5373E9A7.8030503@aklaver.com>
  References: <CALSLE1OZxgaVrvudOnqOvSxf=b-UZUkDT-90-+4Brt71OjrSUg@mail.gmail.com> <CALSLE1NtT=nUGJ2d9K3tZJ0-O28RHU+vJDpFqDM5gb7Yo2c2=A@mail.gmail.com> <5373E9A7.8030503@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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