Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id CB6CE9FBC48 for ; Fri, 16 Feb 2007 10:30:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 50774-02 for ; Fri, 16 Feb 2007 10:30:12 -0400 (AST) Received: from pgfoundry.org (pgfoundry.org [200.46.204.130]) by postgresql.org (Postfix) with ESMTP id 13D0B9FBC88 for ; Fri, 16 Feb 2007 10:30:18 -0400 (AST) Received: from localhost (unknown [200.46.204.182]) by pgfoundry.org (Postfix) with ESMTP id 2CBC4217285; Fri, 16 Feb 2007 14:30:18 +0000 (UTC) Received: from pgfoundry.org ([200.46.204.130]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 60961-04; Fri, 16 Feb 2007 10:30:11 -0400 (AST) Received: by pgfoundry.org (Postfix, from userid 80) id 104A9217282; Fri, 16 Feb 2007 14:30:17 +0000 (UTC) To: noreply@pgfoundry.org From: Subject: [ psqlodbc-Bugs-1002054 ] SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect. Content-type: text/plain; charset=UTF-8 Message-Id: <20070216143017.104A9217282@pgfoundry.org> Date: Fri, 16 Feb 2007 14:30:17 +0000 (UTC) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/26 X-Sequence-Number: 8650 Bugs item #1002054, was opened at 2007-02-16 14:30 You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1002054&group_id=1000125 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect. Initial Comment: I discovered this as a side effect of something that seems to have changed. Seemingly, setting SQL_DESC_TYPE clears any information set during SQLBindCol (this is very different behaviour to all other ODBC drivers). Attempting to get around this by subsequently re-setting the indicator pointer seems to have no effect. Looking in pgapi30.c, it seems that this is the case: break; case SQL_DESC_DATA_PTR: opts->bindings[row_idx].buffer = Value; break; case SQL_DESC_INDICATOR_PTR: tptr = opts->bindings[row_idx].used; if (Value != tptr) { ret = SQL_ERROR; DC_set_error(desc, DESC_INVALID_DESCRIPTOR_IDENTIFIER, "INDICATOR != OCTET_LENGTH_PTR"); } break; case SQL_DESC_OCTET_LENGTH_PTR: opts->bindings[row_idx].used = Value; break; case SQL_DESC_OCTET_LENGTH: opts->bindings[row_idx].buflen = CAST_PTR(SQLLEN, Value); break; case SQL_DESC_PRECISION: opts->bindings[row_idx].precision = CAST_PTR(SQLSMALLINT, Value); note, unlike all other options, SQL_DESC_INDICATOR_PTR doesn't seem to have any effect. This all came about trying to determine why SQLFetch was throwing an error on a null data fetch (log file attached), erronously claiming that the strlen_or_ind pointer was null. ---------------------------------------------------------------------- You can respond by visiting: http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1002054&group_id=1000125