SCM

[#1010483] Error "No command text was set" when querying through MS SQL Server

View Trackers | Bugs | Download .csv | Monitor

Date:
2008-09-26 14:53
Priority:
3
State:
Open
Submitted by:
K J (carloscastaneda)
Assigned to:
Nobody (None)
Category:
Group:
Resolution:
None
 
Summary:
Error "No command text was set" when querying through MS SQL Server

Detailed description
Hi all,

when I run the the following query "select * from OPENQUERY(LPGOLEDB, 'select * from pg_tables')" where LPGOLEDB is a linked server to a local postgres database I get the following errors:

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "PostgreSQL" for linked server "LPGOLEDB" reported an error. No command text was set.
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "PostgreSQL" for linked server "LPGOLEDB".

Here's is also the LogFile of the provider.

Any help/hint is appreciated.

TIA
KJ

Starting logging
IDBPropertiesImpl::GetPropertyInfo
m_pCUtlPropInfo == NULL
IDBPropertiesImpl::GetProperties
IDBPropertiesImpl::SetProperties
IDBInitializeImpl::Initialize
IDBCreateSessionImpl::CreateSession
IDBPropertiesImpl::GetProperties
CErrorLookupService::ClearErrorCPgSession::PQexec 0, "SET client_encoding TO "Unicode""
CPgSession::PQexec 0, "select oid from pg_type where typname='utinyint'"
CPgSession::PQexec 0, "select oid from pg_type where typname='varcharci'"
CPgSession::PQexec 0, "SELECT oid, typalign FROM pg_type"
IGetDataSourceImpl::GetDataSource
IDBPropertiesImpl::GetProperties
IDBPropertiesImpl::GetPropertyInfo
IDBCreateCommandImpl::CreateCommand
IObjectWithSiteImpl::SetSite
CPgCommand::SetCommandText "select * from pg_tables"
ICommandTextImpl::SetCommandText
CPgCommand::SetParameterInfo
CErrorLookupService::ClearErrorICommandPropertiesImpl::SetProperties

Followup

Message
Date: 2009-03-24 14:39
Sender: K J

Hi,

currently I'm use MS OLEDB for ODBC Provider to connect to
postgres. But I'd like to connect directly using the native
postgres OLEDB provider. But the problem I'm still facing is
mentioned in the first note.

Regards
KJ

PS: If you've got a solution the please post it here.
Date: 2009-03-18 04:57
Sender: NEO OZ

Hi,

I am having the same problem when trying to connect to the linked server, how did you resolve the problem?

Regards,
APG

Attached Files:

Changes:

Field Old Value Date By
summaryError "No command text was set" when querying through MS SQL Server2009-03-24 14:39carloscastaneda
Powered By FusionForge