pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: James Slater <james.slater@keynetix.com>
To: pgsql-odbc@postgresql.org
Subject: AsText
Date: Mon, 21 Jun 2010 15:05:21 +0100 (IST)
Message-ID: <25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com> (raw)
In-Reply-To: <8597990.131431277128947555.JavaMail.root@zimbra.keynetix.com>

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





view thread (2+ messages)  latest in thread

Message-ID: <25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com>
Permalink:  ../25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com/
Also on:    postgresql.org/message-id/25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com

 · 

reply

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: <25211099.131451277129121404.JavaMail.root@zimbra.keynetix.com>
  References: <8597990.131431277128947555.JavaMail.root@zimbra.keynetix.com> <25211099.131451277129121404.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