Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkhNB-0004yO-5I for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 22:10:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WkhNA-0007kE-Bl for pgsql-odbc@arkaria.postgresql.org; Wed, 14 May 2014 22:10:00 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkhN9-0007k3-IB for pgsql-odbc@postgresql.org; Wed, 14 May 2014 22:09:59 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WkhN1-0000LH-8O for pgsql-odbc@postgresql.org; Wed, 14 May 2014 22:09:58 +0000 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id CEBAB21301 for ; Wed, 14 May 2014 18:09:42 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 14 May 2014 18:09:45 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=mP2V5tibvvS+UkBLsel9oDTZLv0=; b=oGMQJw7p+HTepRp2cfAFgfpUdQN9 wHO1uUMVLBayWok+QHWkYzqech51eMa6fCdouI5EW8uDo6uCG3+N7bxfylG8bSCx yvVQR3FKfHOT+4voyHGJbP0N53wpMqLRB3kSC9e7tH1dgNxKHSg3kYMZc1Xvcul0 cSpRgwKgOIgCM9A= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=mP2V5tibvvS+UkBLsel9oD TZLv0=; b=MNBq+2ujcaxVqL6IjcA3hEAOtTsyRrzjHWHRmIZ0TkDSkl3+rPQMEy Zg6Ote9nDucwRwlGV5wl+/uIxQXzMplkB4wviAK9BOYHk6kCuvARembHVjzcdgw6 zUghPaYhLXzruwYvWUsvY3k9rku+n+F9eoP47RYzGmpyq5TXZfxf4= X-Sasl-enc: tsgen1JajVEzMvRJoUk10rma5VOPRg3AUpsvUxYfiz3F 1400105382 Received: from killi.site (unknown [24.17.179.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C7ADC007AB; Wed, 14 May 2014 18:09:42 -0400 (EDT) Message-ID: <5373E9A7.8030503@aklaver.com> Date: Wed, 14 May 2014 15:09:43 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Dev Kumkar , "pgsql-odbc@postgresql.org" Subject: Re: Fetching Date and Timestamp values References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 05/14/2014 02:33 PM, Dev Kumkar wrote: > On Wed, May 14, 2014 at 10:19 PM, Dev Kumkar > 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.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