From: James Slater <james.slater@keynetix.com>
To: pgsql-odbc@postgresql.org
Subject: Re: AsText
Date: Mon, 21 Jun 2010 17:46:06 +0100 (IST)
Message-ID: <32209985.131911277138766744.JavaMail.root@zimbra.keynetix.com> (raw)
In-Reply-To: <25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com>
To add a bit more info, same problem occurs when selecting other postgis functions, for example ST_Length
----- Original Message -----
From: "James Slater" <james.slater@keynetix.com>
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(<linked_server>,'
SELECT AsText(tbl.geom)::varchar(4000) as t
FROM <table_name> tbl
')
It returns the following Error : Cannot get the column information from OLE DB provider "MSDASQL" for linked server "<linked_server>".
Where as if I change the query to the following :
select * from OPENQUERY(<linked_server>,'
SELECT t FROM (
SELECT AsText(tbl.geom)::varchar(4000) as t
FROM <table_name> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: james.slater@keynetix.com
Subject: Re: AsText
In-Reply-To: <32209985.131911277138766744.JavaMail.root@zimbra.keynetix.com>
References: <25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com> <32209985.131911277138766744.JavaMail.root@zimbra.keynetix.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox