Unable to query Salesforce Order object

Discussion of open issues, suggestions and bugs regarding usage of ODBC Drivers
Post Reply
brianm1
Posts: 2
Joined: Fri 03 Mar 2017 18:07

Unable to query Salesforce Order object

Post by brianm1 » Fri 03 Mar 2017 18:20

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!

rparra
Posts: 1
Joined: Tue 04 Apr 2017 02:19

Re: Unable to query Salesforce Order object

Post by rparra » Tue 04 Apr 2017 02:22

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,

MaximG
Devart Team
Posts: 1019
Joined: Mon 06 Jul 2015 11:34

Re: Unable to query Salesforce Order object

Post by MaximG » Wed 05 Apr 2017 06:22

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"');

brianm1
Posts: 2
Joined: Fri 03 Mar 2017 18:07

Re: Unable to query Salesforce Order object

Post by brianm1 » Fri 28 Apr 2017 22:42

That did it, thanks for the help.

~Brian

MaximG
Devart Team
Posts: 1019
Joined: Mon 06 Jul 2015 11:34

Re: Unable to query Salesforce Order object

Post by MaximG » Thu 04 May 2017 14:43

We are glad to see the problem resolved. Please don't hesitate to contact us with questions concerning ODBC Drivers usage.

Post Reply