varbinary(max)

Posted by leonardvictor on 28-Sep-2017 12:11

Hi 

I am trying to build a POC for connecting salesforce to SQL server using DataDirect Cloud. My requirement is pull a  SQL table with 3 columns in to salesforce using HTTP request. Out of those 3 columns one of the column in varbinary(max) I am able to pull other two number/text columns but not the varbinary(max). I tried it using REST tools (SOAP UI,Postman) too but no luck.

All Replies

Posted by aburg on 28-Sep-2017 18:34

Hi Leonard,

I am researching this and will follow up with you as soon as possible.

In the meantime, can you clarify if you are using Salesforce Connect to make the OData queries or doing this via APEX code?

Thanks

Aaron

Posted by jhobson on 28-Sep-2017 19:25

I suspect varbinary(max) is too large to be supported by the D2C/HDP OData interface, so it is omitted. Sorry.

Posted by stevev on 28-Sep-2017 19:31

If the varbinary(max) column has a max length is greater than 32768 then it is omitted by the OData model.  If this is just POC, you may want to reduce the size of the column.  

Even if you get the OData model to expose the column, Salesforce may still just ignore it.  Last time I checked, Salesforce did not handle not long binary values.

Posted by aburg on 29-Sep-2017 12:33

Leonard,

Are you able to specify a length for the field vs using MAX? I tested with varbinary(50), for example, and it worked. Another idea would be to create a view which uses a different datatype and point the D2C/HDP request to the view.

Thanks

Aaron

This thread is closed