pg.ddx.io pgsql-odbc@postgresql.org mailing list archivehelp / color / mirror / Atom feed
AsText 2+ messages / 1 participants [nested] [flat]
* AsText @ 2010-06-21 14:05 James Slater <james.slater@keynetix.com> 0 siblings, 1 reply; 2+ messages in thread From: James Slater @ 2010-06-21 14:05 UTC (permalink / raw) To: pgsql-odbc 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: AsText @ 2010-06-21 16:46 James Slater <james.slater@keynetix.com> parent: James Slater <james.slater@keynetix.com> 0 siblings, 0 replies; 2+ messages in thread From: James Slater @ 2010-06-21 16:46 UTC (permalink / raw) To: pgsql-odbc 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-06-21 16:46 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2010-06-21 14:05 AsText James Slater <james.slater@keynetix.com> 2010-06-21 16:46 ` James Slater <james.slater@keynetix.com>
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