ODBC drivers >

JDBC drivers >

Bridges, gateways >

Other >

All products

Connect JDBC to any ODBC driver

Connect JDBC to Microsoft Access

Cross-platform or cross-architecture access to any ODBC driver

ODBC access to any JDBC driver

Connect dbExpress applications to any ODBC driver

Connect XML applications to any ODBC driver

Access mutiple ODBC data sources from one SQL statement

Create custom ODBC drivers

Bespoke data access requirements

In the pipeline

Support

Resources

Quick start

Licensing

Knowledge Base

User Guides

Company

About Us

Careers & Partners

Inserting large object data into Salesforce from SQL Server

Easysoft customers use our Salesforce ODBC driver to work with Salesforce data in SQL Server. Difficulties arise when customers attempt to insert large object data into Salesforce from SQL Server. For example, attempting to insert data into the Product2 description field:

INSERT OPENQUERY (SALESFORCE, 'SELECT Name, ProductCode, Description FROM Product2') VALUES ('LongProd', 'LP01', 'My Long Field');
OLE DB provider "MSDASQL" for linked server "SALESFORCE" returned message
"Query-based insertion or updating of BLOB values is not supported."

This INSERT fails, as indicated by the resultant error message. The underlying issue seems to be that for some INSERT methods, you cannot update a LONGVARCHAR or LONGNVARCHAR field from SQL Server when using an ODBC-based linked server. (The problem field, Description, is a Salesforce TEXTAREA, which the Salesforce ODBC driver reports to SQL Server as a LONGNVARCHAR.)

The only way we have found to insert large object data into Salesforce is:

EXEC ('INSERT INTO Product2 ( [Name], ProductCode, [Description] ) VALUES ( ''MyProduct'', ''MP01'', ''MyProduct long description'')') AT MySalesforceLinkedServer

Presumably, this method succeeds because the layer in SQL Server that objects to inserting LONGVARCHAR data is not used. (Although this method still uses a linked server, and therefore the Salesforce ODBC driver.)

Further information

Share:

AltStyle によって変換されたページ (->オリジナル) /