Page 1 of 1

ODBC for Magento - Cannot get the column information

Posted: Mon 30 Sep 2019 17:06
by robgilchrist
Hi
I have setup my ODBC For Magento Driver to connect to my Magento Cloud instance (2.27) and created a System DSN, which connects successfully.

I followed the documentation for setting up a Linked server in SSMS, which appeared to be successful. When I drill into the Linked Server I can see a list of tables eg Categories, CategoryAttribites, CategoryProducts, etc

However if is try to view the contents of these tables I get an error eg

Code: Select all

-- [MAGENTODRIVER]...[Categories] contains no columns that can be selected or the current user does not have permissions on that object.
And when I ran this query in Querybrowser,

Code: Select all

SELECT * 
FROM openquery(MAGENTODRIVER, 'SELECT * FROM default.Categories')
I get

Code: Select all

Msg 7399, Level 16, State 1, Line 4
The OLE DB provider "MSDASQL" for linked server "MAGENTODRIVER" reported an error. The provider did not give any information about the error.
Msg 7350, Level 16, State 2, Line 4
Cannot get the column information from OLE DB provider "MSDASQL" for linked server "MAGENTODRIVER".
Can anyone help tell me what the problem is

Thanks
Rob

Re: ODBC for Magento - Cannot get the column information

Posted: Thu 03 Oct 2019 08:19
by MaximG
To retrieve data from the Account table, try executing the following query in SQL Server Management Studio:

Select * From [MAGENTODRIVER]...[Categories]