Page 1 of 1

Unable to query Salesforce Order object

Posted: Fri 03 Mar 2017 18:20
by brianm1
Hi,

Using the SF ODBC driver I've been unable to retrieve data out of the Salesforce Order object. This is my current query:

SELECT * FROM OPENQUERY([SALESFORCE], 'select * from Order');

This results in the following error:
OLE DB provider "MSDASQL" for linked server "SALESFORCE" returned message "[Devart][ODBC][Salesforce]You have an error in your SQL syntax at line 1, column 19: Unexpected symbol 'Order'".
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "MSDASQL" for linked server "SALESFORCE".

Knowing that Order is a keyword in SQL I also tried [Order] and dbo.[Order], however in both cases the error is now:
OLE DB provider "MSDASQL" for linked server "SALESFORCE" returned message "[Devart][ODBC][Salesforce]Object '[Order]' does not exist".
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "MSDASQL" for linked server "SALESFORCE".

Any thoughts on how I can get around this so I can retrieve the data in this object?

I also tried using the more standard four part notation for linked servers, however I get the same error.
SELECT * FROM [SALESFORCE]...[Order]
OLE DB provider "MSDASQL" for linked server "SALESFORCE" returned message "[Devart][ODBC][Salesforce]You have an error in your SQL syntax at line 1, column 15: Unexpected symbol 'Order'".
Msg 7306, Level 16, State 2, Line 34
Cannot open the table "Order" from OLE DB provider "MSDASQL" for linked server "SALESFORCE".

Unfortunately I'm not able to browse the Catalogs thru SSMS as I get the error "cannot obtain the schema rowset DBSCHEMA_TABLES" error reported in other posts.

Thanks!

Re: Unable to query Salesforce Order object

Posted: Tue 04 Apr 2017 02:22
by rparra
Hi,
I have the same problem.... no matter what I try, I cannot access the object 'Order'
Have you ever heard from them with a solution to this issue?
:x
Thanks,

Re: Unable to query Salesforce Order object

Posted: Wed 05 Apr 2017 06:22
by MaximG
Try to get the Order table data in the Microsoft SQL Server Management Studio environment using the following query:
SELECT * FROM OPENQUERY([SALESFORCE],'Select * From "Order"');

Re: Unable to query Salesforce Order object

Posted: Fri 28 Apr 2017 22:42
by brianm1
That did it, thanks for the help.

~Brian

Re: Unable to query Salesforce Order object

Posted: Thu 04 May 2017 14:43
by MaximG
We are glad to see the problem resolved. Please don't hesitate to contact us with questions concerning ODBC Drivers usage.