Salesforce SOQL from Apache OpenOffice
The Salesforce ODBC Driver extends the number of applications that you can use Salesforce SOQL from.
To get started:
- Install and license the Salesforce.com ODBC Driver on the machine where Apache OpenOffice is installed.
Before you can use the Salesforce.com ODBC Driver to connect your application to Salesforce.com, you need to configure an ODBC data source. An ODBC data source stores the connection details for the target database (e.g. Salesforce.com) and the ODBC driver that is required to connect to it (e.g. the Salesforce.com ODBC driver).
To run ODBC Administrator (which you use to create a data source), in the Windows Run dialog box, type this command if you are using a 64-bit version of Apache OpenOffice:
Type this command if you are using a 32-bit version of Apache OpenOffice:
To create a Salesforce.com ODBC Driver data source:
- In ODBC Administrator, choose the System DSN tab, and then choose Add.
- In the Create New Data Source dialog box, choose Easysoft Salesforce SOQL ODBC Driver, and then choose Finish.
- Complete the Easysoft Salesforce SOQL ODBC Driver DSN Setup dialog box:
Setting Value DSN Salesforce.com User Name The name of your Salesforce.com user. For example, firstname.lastname@example.org. Password The password for your Salesforce.com user. Token The security token for your Salesforce.com user, if required.
To find out whether you need to supply a security token, choose the Test button. If the connection attempt fails with an error which contains
LOGIN_MUST_USE_SECURITY_TOKEN, you need to supply one.
Salesforce.com emails the security token to the email address associated with your Salesforce.com user account. If you have not received a security token, you can regenerate it. Salesforce.com will then email the new security token to you. To regenerate your security token, log in to Salesforce.com and then choose Setup from the user menu. Search for "security token" in the Quick Find box. Click Reset Security Token in the Reset Security Token page. When you receive the token in your email client, copy it and then paste it into the Token field.
- Use the Test button to verify that you can successfully connect to Salesforce.com.
Using the Salesforce ODBC driver to access Salesforce data with the OpenOffice Database Wizard:
- Open OpenOffice Base.
- In the Database Wizard, choose Connect to an existing database, and then choose ODBC. Choose Next.
- Browse for your ODBC data source, and then choose Next.
- Choose Next, the ODBC data source contains a user name and password, there's no need to re-enter them.
- Choose Finish, and then save your database when prompted.
- In the OpenOffice Base window, right-click the Account table and choose Open.
Using the Salesforce ODBC driver to work with Salesforce data by using SOQL in a pass-through query:
- Open the OpenOffice Base database you created by following the previous instructions.
- Choose Queries, and then
- Right-click the Query tab, and then choose SQL View.
- Enter your SOQL statement in the Query pane. For example:
SELECT Account.Name, (SELECT Contact.LastName FROM Account.Contacts) FROM Account
- Choose the Run Query button.
Using the Salesforce ODBC driver to access Salesforce data from Calc:
- Create a new Calc spreadsheet.
- On the View menu, choose Data Source.
- Expand the Tables or Queries for a Base database that uses a Salesforce ODBC driver data source for its data.
- Drag the Table or Query to the Calc worksheet to retrieve the Salesforce data.