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

Attaching a ContentDocument to a Salesforce custom object

The Salesforce ODBC driver enables you to work with Salesforce by using SQL (and since version 2.0 of the driver, SOQL as well).

After you have downloaded, installed, and licensed the Salesforce ODBC driver (refer to the driver documentation), you need to set up an ODBC data source where you specify your Salesforce user name and password. You're then ready to enter some SQL in your ODBC application.

To address the subject of this blog, which was based on a customer request, this SQL statement:

INSERT INTO
 ContentDocumentLink (LinkedEntityId, ContentDocumentId, ShareType)
VALUES
 ('a000H00000sWZ9AQAW', '0690H000004bVnOQAU', 'V')

adds the specified custom object to the ContentDocument's Shared With list in the Salesforce back-end GUI, where:

  • a000H00000sWZ9AQAW is the ID of a custom object.
  • 0690H000004bVnOQAU is the id of a ContentDocument.
  • V (Viewer) is a ShareType/.

The ShareType can also be C (Collaborator) or I (Inferred). However, during testing I didn't work for us. We got an "access denied" error, which is strange since we only use one user, a system administrator, to do everything in Salesforce.

Share:

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