Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 14DD4632340 for ; Mon, 21 Jun 2010 11:05:33 -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 89132-05 for ; Mon, 21 Jun 2010 14:05:23 +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 EC9866321B1 for ; Mon, 21 Jun 2010 11:05:24 -0300 (ADT) Received: from zimbra.keynetix.com (zimbra.office.keynetix.com [192.168.10.2]) by office.keynetix.com (Postfix) with ESMTP id E467B1B3013C for ; Mon, 21 Jun 2010 15:05:15 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra.keynetix.com (Postfix) with ESMTP id ECB554789F7 for ; Mon, 21 Jun 2010 15:05:21 +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 CAyYLnASr3lf for ; Mon, 21 Jun 2010 15:05:21 +0100 (BST) Received: from zimbra.keynetix.com (zimbra.keynetix.com [192.168.10.2]) by zimbra.keynetix.com (Postfix) with ESMTP id 8D6244789F6 for ; Mon, 21 Jun 2010 15:05:21 +0100 (BST) Date: Mon, 21 Jun 2010 15:05:21 +0100 (IST) From: James Slater To: pgsql-odbc@postgresql.org Message-ID: <25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com> In-Reply-To: <8597990.131431277128947555.JavaMail.root@zimbra.keynetix.com> Subject: 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/39 X-Sequence-Number: 10339 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