Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9C44D63223E for ; Mon, 21 Jun 2010 13:46:16 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 57920-05 for ; Mon, 21 Jun 2010 16:46:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from office.keynetix.com (office.keynetix.com [78.32.175.153]) by mail.postgresql.org (Postfix) with ESMTP id E20CC6321B1 for ; Mon, 21 Jun 2010 13:46:08 -0300 (ADT) Received: from zimbra.keynetix.com (zimbra.office.keynetix.com [192.168.10.2]) by office.keynetix.com (Postfix) with ESMTP id A4D211B30145 for ; Mon, 21 Jun 2010 17:46:01 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.keynetix.com (Postfix) with ESMTP id AE5504789F7 for ; Mon, 21 Jun 2010 17:46:07 +0100 (BST) Received: from zimbra.keynetix.com ([127.0.0.1]) by localhost (zimbra.keynetix.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IQ8O-6UE21SQ for ; Mon, 21 Jun 2010 17:46:06 +0100 (BST) Received: from zimbra.keynetix.com (zimbra.keynetix.com [192.168.10.2]) by zimbra.keynetix.com (Postfix) with ESMTP id CC0A94789F6 for ; Mon, 21 Jun 2010 17:46:06 +0100 (BST) Date: Mon, 21 Jun 2010 17:46:06 +0100 (IST) From: James Slater To: pgsql-odbc@postgresql.org Message-ID: <32209985.131911277138766744.JavaMail.root@zimbra.keynetix.com> In-Reply-To: <25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com> Subject: Re: AsText MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.10.13] X-Mailer: Zimbra 5.0.13_GA_2791.RHEL5 (ZimbraWebClient - FF3.0 (Win)/5.0.13_GA_2791.RHEL5) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/40 X-Sequence-Number: 10340 To add a bit more info, same problem occurs when selecting other postgis functions, for example ST_Length ----- Original Message ----- From: "James Slater" To: pgsql-odbc@postgresql.org Sent: Monday, 21 June, 2010 15:05:21 GMT +00:00 GMT Britain, Ireland, Portugal Subject: [ODBC] AsText Hi All Using SQL Server 2008 64bit with a linked server to the experimental 64bit postgres ODBC driver I have experienced the following problem: If I execute the following query, which should return the WKT string of the geometry for all items in the table. select * from OPENQUERY(,' SELECT AsText(tbl.geom)::varchar(4000) as t FROM tbl ') It returns the following Error : Cannot get the column information from OLE DB provider "MSDASQL" for linked server "". Where as if I change the query to the following : select * from OPENQUERY(,' SELECT t FROM ( SELECT AsText(tbl.geom)::varchar(4000) as t FROM tbl ) tmpTable ') The query runs no problem. Querying out other varchar fields from the postgres table also works no problem, it just seems to be the AsText function? Its not really too much of a problem as there is an easy work around, but just wondering if you have any more info on why this was happening. Thanks James -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc