Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 4473F2E399B for ; Mon, 7 Jan 2008 03:31:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 82135-02 for ; Mon, 7 Jan 2008 03:31:25 -0400 (AST) Received: from obelix.askesis.nl (laudanum.demon.nl [82.161.125.16]) by postgresql.org (Postfix) with ESMTP id 5FE692E0251 for ; Mon, 7 Jan 2008 03:31:27 -0400 (AST) thread-index: AchQ/0+bZ/yW1z7STlmYOnSqdvbTyQ== X-PMWin-Version: 2.6.1, Antivirus-Engine: 2.50.6 Received: from [172.31.1.1] ([172.31.1.1]) by obelix.askesis.nl with Microsoft SMTPSVC(5.0.2195.6713); Mon, 7 Jan 2008 08:31:26 +0100 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Subject: SQLDescribeCol returns wrong columnsize for macaddress ? From: "Joost Kraaijeveld" To: Content-Type: text/plain; charset="iso-8859-1" Date: Mon, 07 Jan 2008 08:31:24 +0100 Message-ID: <1199691085.4503.26.camel@panoramix.askesis.nl> MIME-Version: 1.0 X-Mailer: Evolution 2.10.3 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Jan 2008 07:31:26.0174 (UTC) FILETIME=[4F8F67E0:01C850FF] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.032 tagged_above=0 required=5 tests=AWL=0.031, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200801/5 X-Sequence-Number: 9312 Hi, It appears that SQLDescribeCol returns the wrong column size for the macaddress datatype: it returns 6. Using that size in SQLBindCol results in a SQLFetch error of SQL_SUCCESS_WITH_INFO and the message "Fetched item was truncated". Changing the size to 18 in SQLBindCol works OK. Should the return value of SQLDescribeCol indeed be 18 (the length of the text string "00:00:00:00:00:00" including a '\0') instead of 6? If not, is there a way to get the exact type of such a column to handle this case: SQLDescribeCol seems to return SQL_VARCHAR as type so I cannot differentiate between a real SQL_VARCHAR and a macaddress? TIA -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 web: www.askesis.nl