Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZSTn7-0003Zw-LR for pgsql-bugs@arkaria.postgresql.org; Thu, 20 Aug 2015 17:38:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZSTn7-0004hl-7Q for pgsql-bugs@arkaria.postgresql.org; Thu, 20 Aug 2015 17:38:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZSSwg-0004x1-BC for pgsql-bugs@postgresql.org; Thu, 20 Aug 2015 16:44:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZSSwd-0007SN-2x for pgsql-bugs@postgresql.org; Thu, 20 Aug 2015 16:44:05 +0000 MIME-Version: 1.0 Subject: BUG #13582: ODBC drvier 9.03.0400 report SQL_NULLDATA when timestamp data has microsecond present To: pgsql-bugs@postgresql.org From: john_zhu@acl.com Date: Thu, 20 Aug 2015 16:43:57 +0000 Message-ID: <20150820164357.7674.70809@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13582 Logged by: John Zhu Email address: john_zhu@acl.com PostgreSQL version: 9.3.9 Operating system: Windows 7 Description: Column type: timestamp without time zone Data: 2000-10-12 11:21:12.345335 When import from ODBC, psqlodbc 9.03.0300-1 driver can successfully import this data. However, when import using 9.03.0400 driver, the StrLen_or_IndPtr will return SQL_NULL_DATA, however, the data is presented in the buffer. Manually remove the microsecond part (e.g. 2000-10-12 11:21:12) will import successfully. Binding is using SQL_C_TCHAR type: SQLBindCol(hStmt, 1, SQL_C_TCHAR, pBuffer, ColLength, ptrInd); -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs