ODBC Salesforce Driver
Query and write Salesforce objects with SOQL-friendly SQL over ODBC.
Query Salesforce objects with SQL and SOQL relationship syntax. Insert, update, upsert and delete records, use the Bulk API for large loads, and work with Salesforce data in SQL Server (T-SQL) or your BI, ETL and reporting tools.
Included in the Professional edition and above
- Any ODBC-compliant tool
- Runs in your environment
- SQL Server via Data Gateway
- 32-bit and 64-bit

At a glance
What the Salesforce Driver can do
Query and write Salesforce objects with SOQL-friendly SQL over ODBC.
Objects as tables
Query Salesforce objects with SQL and SOQL relationship syntax, including parent-to-child subqueries.
- SOQL-style SELECT
- Relationship queries
- Aggregates and GROUP BY
Read and write
Run INSERT, UPDATE and DELETE statements and use the Bulk API for large loads.
- DML statements
- Bulk API option
- Upsert by external Id
Familiar SQL
Use WHERE, ORDER BY, GROUP BY and built-in math, string, date and JSON functions on top of the data source.
- Standard SELECT syntax
- Custom functions in the SQL dialect
- Driver options in a WITH clause
Works with the tools you have
Any ODBC-compliant tool can use the DSN: Power BI, Tableau, Qlik, SSRS, Informatica, Excel and SSIS.
- Create a DSN once, reuse it everywhere
- 32-bit and 64-bit ODBC
- Stored in the standard ODBC Data Source Administrator
Use it from code
Connect from Java, C#, Python, PowerShell and more with an ODBC connection string that names the DSN.
- Standard ODBC connection strings
- Parameterized queries
- Same SQL as in the UI
SQL Server via Data Gateway
Query the driver from SQL Server (linked server / OPENQUERY) without installing it on the SQL Server machine, through the Data Gateway.
- No driver install on the server
- Works with SQL Server 2012 through 2025 (32/64 bit)
- Same DSN, same SQL
See all features
- Read Salesforce CRM using familiar SQL Query language
- Support SELECT / INSERT / UPDATE / DELETE SQL syntax (CRUD operations)
- Support BULK API for large dataset (Table / SOQL Query)
- Support Parallel Processing by default (Adjust MaxParallelThreads = 6)
- Support loading a large amount of data from external systems using SOURCE clause
- Integrate insight any ODBC Compliant Reporting / ETL tools (e.g. Power BI, Tableau, Qlik, SSRS, Informatica, Excel, SSIS)
- Support for programming languages such as JAVA, C#, Python, PowerShell and more…
- Tight integration with Microsoft SQL Server (With support for Gateway Option – No need to install Driver on Server)
- Support for full SOQL Query Language
- Supports OAuth Tokens security rather than Password (useful for 2FA / MFA handling)
SQL Server 2012–2025
Ways to use it
Pick how you reach your data.
Configure the DSN once, then query it from any ODBC tool or from SQL Server.
Query objects with SOQL-style SQL.
Select fields, filter, sort and aggregate. Parent and child relationships are supported.
- Relationship queries
- Aggregates
- Preview in the UI

Insert, update and delete records.
Run DML statements, and use Bulk API for large volumes.
- INSERT / UPDATE / DELETE
- Bulk API
- Upsert

Query it from SQL Server with Data Gateway.
Expose the driver through the ODBC PowerPack Data Gateway and create a linked server in SQL Server. The driver does not have to be installed on the SQL Server machine.
- Linked server or OPENQUERY
- No driver install on the server
- Works with SQL Server 2012 through 2025 (32/64 bit)

Inside the UI
The driver UI, step by step.
Real screens from the ZappySys ODBC driver configuration.
Create the DSN
Add a user or system DSN and pick the Salesforce Driver.
SQL example
Query Salesforce objects with SOQL-style SQL.
Use familiar SQL (and SOQL relationship queries) against Salesforce objects, then read the result in any ODBC tool. These statements come from the driver help.
-
Salesforce object
Contacts and their parent Accounts in your org (SOQL relationship syntax is supported).
Contact Id, FirstName, LastName Account.Name -- parent relationship -
Run the SQL query
SQL Query
SELECT Id, LastName, FirstName, Account.Name FROM Contact WHERE LastName != 'Smith' ORDER BY LastName LIMIT 10Run it from the Query Editor or from any ODBC client.
Bulk API: large reads and writes can use bulk mode.
-
Rows returned to your tool
Id LastName FirstName Account.Name parent (record Id) (last name) (first name) (account name) One row per Contact, up to the LIMIT in the query. Column headers are real; values come from your org.
More statements the driver understands
| Use case | SQL |
|---|---|
| Parent to child | SELECT Name, (SELECT FirstName, LastName FROM Contacts LIMIT 5) FROM Account WHERE Name='ZappySys' |
| Aggregates | SELECT LeadSource, COUNT(Name) Cnt FROM Lead GROUP BY LeadSource HAVING COUNT(Name) > 100 |
| Update | UPDATE account SET name = 'New Company Name', BillingState = 'GA' WHERE id IN ('0014N00001hTNEEQA4') |
Result values depend on your Salesforce org.
SQL query examples
Copy a query, change the source, run it.
13 of the 28 examples from the Salesforce Driver help. Open one to see the SQL.
Read files, API responses and objects as rows.
SOQL Query – Basic Query
This example shows how to write simple SOQL query (Salesforce Object Query Language). It uses WHERE clause, ORDER BY and LIMIT clause. Using limit clause it will return only 10 records at maximum.
SELECT Id, LastName, FirstName
FROM Contact
Where LastName!='Smith'
ORDER BY LastName, FirstName
LIMIT 10
SOQL Query – Parent fields (Child-to-Parent / Many-to-One)
This example shows how to get field value from related parent object using dot operator.
SELECT Id,FirstName, LastName, Account.Name FROM Contact
SOQL Query – Child records (Parent-to-Child / One-to-Many)
This example shows how to get child records for selected parent records (e.g. All contacts for specified accounts).
SELECT Account.Id,Account.Name
, (SELECT Contact.FirstName, Contact.LastName, Contact.Email FROM Account.Contacts)
FROM Account
SOQL Query – Child Query with Order By and LIMIT
This example shows how to use child query and limit number or child records for each parent row.
SELECT Name,
(SELECT FirstName, LastName FROM Contacts ORDER BY CreatedDate LIMIT 5)
FROM Account
Where Name='ZappySys'
SOQL Query – Object and field alias
This example shows how to alias Table name or field name in SOQL queries. SOQL has very limited support for alias. You can alias Table name in any query but field alias is only allowed in Aggregation query only (Query with at least one aggregation function).
SELECT c.Id, c.LastName, a.Name
FROM Contact c,c.Account a
LIMIT 10
SOQL Query – GROUP BY / Aggregate function
This example shows how to use GROUP BY clause along with optional HAVING clause. When you use Aggregate function in SQL Query you can also use alias for field (This is the only time alias can be used).
SELECT LeadSource, COUNT(Name) Cnt
FROM Lead
GROUP BY LeadSource
HAVING COUNT(Name) > 100
SOQL Query with DateTime / Use of variable
This example shows how to use date/time in WHERE clause. Date and time must be yyyy-MM-ddTHH:mm:ssZ format (make sure to include time part and add Z for UTC indicator after date and time just like example).
SELECT Id, LastName, FirstName, Email, Account.Name
FROM Contact
Where LastModifiedDate < {{System::ContainerStartTime,TO_UTC_DATETIME}} AND LastModifiedDate > 1999-12-31T00:00:00Z AND CreatedDate < YESTERDAY
LIMIT 10
INSERT, UPDATE, DELETE, UPSERT and bulk loads.
DML – UPDATE Example
This example shows how to use UPDATE one or more records in salesforce table. You can supply any valid SOQL compatible WHERE clause.
UPDATE account SET name='New Company Name', BillingState='GA' WHERE id IN ('0014N00001hTNEEQA4')
WITH(
Output=1 /*Other values can be Output='*' , Output=1 , Output=0 , Output='Col1,Col2...ColN'. When Output option is supplied then error is not thrown but you can capture status and message in __RowStatus and __ErrorMessage output columns*/
--,IgnoreFieldsIfInputNull=1 --Set this option to True if you wish to ignore fields if input value is NULL. By default target field is set to NULL if input value is NULL.
--,FieldsToSetNullIfInputNull='SomeColum1,SomeColumn5,SomeColumn7' --Comma separated CRM entity field names which you like to set as NULL when input value is NULL. This option is ignored if IgnoreFieldsIfInputNull is not set to True.
--,AssignmentRuleId='xxxxx' --rule id to invoke on value assignment
--,UseDefaultAssignmentRule=1 --sets whether you like to use default rule
--,AllOrNone=1 --If true, any failed records in a call cause all changes for the call to be rolled back. Record changes aren't committed unless all records are processed successfully. The default is false. Some records can be processed successfully while others are marked as failed in the call results.
--,OwnerChangeOptions='option1,option2...optionN' -- use one or more options from below. Use '-n' suffix to disable option execution e.g. TransferOpenActivities-n
-->>> Available owner change options: EnforceNewOwnerHasReadAccess,TransferOpenActivities,TransferNotesAndAttachments,TransferOthersOpenOpportunities,TransferOwnedOpenOpportunities,TransferOwnedClosedOpportunities,TransferOwnedOpenCases,TransferAllOwnedCases,TransferContracts,TransferOrders,TransferContacts,TransferArticleOwnedPublishedVersion,TransferArticleOwnedArchivedVersions,TransferArticleAllVersions,KeepAccountTeam,KeepSalesTeam,KeepSalesTeamGrantCurrentOwnerReadWriteAccess,SendEmail
-->>> For more information visit https://zappysys.com/link/?id=10141
--,AllowFieldTruncation=1 --If true, truncate field values that are too long, which is the behavior in API versions 14.0 and earlier.
--,AllowSaveOnDuplicates=1 --Set to true to save the duplicate record. Set to false to prevent the duplicate record from being saved.
--,EnableParallelThreads=1 --Enables sending Data in multiple threads to speedup. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,MaxParallelThreads=6 --Maximum threads to spin off to speedup write operation. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,TempStorageMode='Disk' --or 'Memory'. Use this option to overcome OutOfMemory Error if you processing many rows. This option enables how Temp Storage is used for query processing. Available options 'Disk' or 'Memory' (Default is Memory)
)
DML – INSERT Example
This example shows how to create a new record in salesforce table.
INSERT INTO Account(Name, BillingCity,PK__c)
VALUES ('mycompany name', 'New York','K100')
WITH(
Output=1 /*Other values can be Output='*' , Output=1 , Output=0 , Output='Col1,Col2...ColN'. When Output option is supplied then error is not thrown but you can capture status and message in __RowStatus and __ErrorMessage output columns*/
--,IgnoreFieldsIfInputNull=1 --Set this option to True if you wish to ignore fields if input value is NULL. By default target field is set to NULL if input value is NULL.
--,FieldsToSetNullIfInputNull='SomeColum1,SomeColumn5,SomeColumn7' --Comma separated CRM entity field names which you like to set as NULL when input value is NULL. This option is ignored if IgnoreFieldsIfInputNull is not set to True.
--,AssignmentRuleId='xxxxx' --rule id to invoke on value assignment
--,UseDefaultAssignmentRule=1 --sets whether you like to use default rule
--,AllOrNone=1 --If true, any failed records in a call cause all changes for the call to be rolled back. Record changes aren't committed unless all records are processed successfully. The default is false. Some records can be processed successfully while others are marked as failed in the call results.
--,OwnerChangeOptions='option1,option2...optionN' -- use one or more options from below. Use '-n' suffix to disable option execution e.g. TransferOpenActivities-n
-->>> Available owner change options: EnforceNewOwnerHasReadAccess,TransferOpenActivities,TransferNotesAndAttachments,TransferOthersOpenOpportunities,TransferOwnedOpenOpportunities,TransferOwnedClosedOpportunities,TransferOwnedOpenCases,TransferAllOwnedCases,TransferContracts,TransferOrders,TransferContacts,TransferArticleOwnedPublishedVersion,TransferArticleOwnedArchivedVersions,TransferArticleAllVersions,KeepAccountTeam,KeepSalesTeam,KeepSalesTeamGrantCurrentOwnerReadWriteAccess,SendEmail
-->>> For more information visit https://zappysys.com/link/?id=10141
--,AllowFieldTruncation=1 --If true, truncate field values that are too long, which is the behavior in API versions 14.0 and earlier.
--,AllowSaveOnDuplicates=1 --Set to true to save the duplicate record. Set to false to prevent the duplicate record from being saved.
--,EnableParallelThreads=1 --Enables sending Data in multiple threads to speedup. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,MaxParallelThreads=6 --Maximum threads to spin off to speedup write operation. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,TempStorageMode='Disk' --or 'Memory'. Use this option to overcome OutOfMemory Error if you processing many rows. This option enables how Temp Storage is used for query processing. Available options 'Disk' or 'Memory' (Default is Memory)
)
DML – DELETE Example
This example shows how to delete one or more records in salesforce table. You can supply any valid SOQL compatible WHERE clause.
DELETE FROM account WHERE id IN ('0014N00001hTNEEQA4')
WITH(
Output=1 /*Other values can be Output='*' , Output=1 , Output=0 , Output='Col1,Col2...ColN'. When Output option is supplied then error is not thrown but you can capture status and message in __RowStatus and __ErrorMessage output columns*/
--,IgnoreFieldsIfInputNull=1 --Set this option to True if you wish to ignore fields if input value is NULL. By default target field is set to NULL if input value is NULL.
--,FieldsToSetNullIfInputNull='SomeColum1,SomeColumn5,SomeColumn7' --Comma separated CRM entity field names which you like to set as NULL when input value is NULL. This option is ignored if IgnoreFieldsIfInputNull is not set to True.
--,AssignmentRuleId='xxxxx' --rule id to invoke on value assignment
--,UseDefaultAssignmentRule=1 --sets whether you like to use default rule
--,AllOrNone=1 --If true, any failed records in a call cause all changes for the call to be rolled back. Record changes aren't committed unless all records are processed successfully. The default is false. Some records can be processed successfully while others are marked as failed in the call results.
--,OwnerChangeOptions='option1,option2...optionN' -- use one or more options from below. Use '-n' suffix to disable option execution e.g. TransferOpenActivities-n
-->>> Available owner change options: EnforceNewOwnerHasReadAccess,TransferOpenActivities,TransferNotesAndAttachments,TransferOthersOpenOpportunities,TransferOwnedOpenOpportunities,TransferOwnedClosedOpportunities,TransferOwnedOpenCases,TransferAllOwnedCases,TransferContracts,TransferOrders,TransferContacts,TransferArticleOwnedPublishedVersion,TransferArticleOwnedArchivedVersions,TransferArticleAllVersions,KeepAccountTeam,KeepSalesTeam,KeepSalesTeamGrantCurrentOwnerReadWriteAccess,SendEmail
-->>> For more information visit https://zappysys.com/link/?id=10141
--,AllowFieldTruncation=1 --If true, truncate field values that are too long, which is the behavior in API versions 14.0 and earlier.
--,AllowSaveOnDuplicates=1 --Set to true to save the duplicate record. Set to false to prevent the duplicate record from being saved.
--,EnableParallelThreads=1 --Enables sending Data in multiple threads to speedup. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,MaxParallelThreads=6 --Maximum threads to spin off to speedup write operation. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,TempStorageMode='Disk' --or 'Memory'. Use this option to overcome OutOfMemory Error if you processing many rows. This option enables how Temp Storage is used for query processing. Available options 'Disk' or 'Memory' (Default is Memory)
)
DML – UPSERT Example (Update or Insert)
This example shows how to Update or Insert record if not found (i.e. UPSERT). For Upsert You must supply Key field name in WITH clause. Driver lookup record based on Key column, if not found in salesforce then it creates a new row else update exising record.
UPSERT INTO Account(Name, BillingCity,SupplierId__c)
VALUES ('mycompany name', 'New York','K100')
WITH (KEY='SupplierId__c',Output=1)
External Input from MSSQL – INSERT multiple rows from MSSQL to Salesforce
This example shows how to call INSERT operation which takes multiple rows as input from external system (i.e. MSSQL, ODBC, OLEDB). In this example we specified Driver Type as MSSQL. For other system (i.e.
INSERT INTO Account
SOURCE('MSSQL' --external driver type (MSSQL, ODBC, OLEDB)
--driver specific connection string (i.e. MSSQL, ODBC, OLEDB)
--SQL Mixed Mode:
, 'Data Source=localhost;Initial Catalog=tempdb;User ID=user1;Password=mypass123;Integrated Security=false'
--OR- SQL Windows Auth: (For this to work - ZappySys Data Gateway Service Account must be added as SQL Server Login) -- See https://zappysys.com/links/?id=10151
--, 'Data Source=localhost;Initial Catalog=tempdb;Integrated Security=true'
,'select ''Account001'' as Name,''City001'' as BillingCity,1 as NumberofLocations__c UNION
select ''Account002'' as Name,''City002'' as BillingCity,2 as NumberofLocations__c UNION
select ''Account003'' as Name,''City003'' as BillingCity,3 as NumberofLocations__c '
--query for external system (i.e. MSSQL). Output column names in query must match columns found in target table (i.e. Account).
--To see all possible columns in target, select table from dropdown on the preview tab
)
WITH(
Output=1 /*Other values can be Output='*' , Output=1 , Output=0 , Output='Col1,Col2...ColN'. When Output option is supplied then error is not thrown but you can capture status and message in __RowStatus and __ErrorMessage output columns*/
--,EnableBulkMode=1 --use this to invoke Bulk API (usually slower for less number of rows, works better for large dataset 5K+)
--OR--
,EnableParallelThreads=1 --//Send records in multiple threads for faster data processing (2000 rows sent in each batch). If you use EnableBulkMode=1 then this option is ignored and 500000 rows processed (in V2) in a each batch (in V1 its 10000) using Job Style API rather than Real Time API (faster for less than few hundred rows).
,MaxParallelThreads=6 --//Maximum threads to use for parallel processing
--,IgnoreFieldsIfInputNull=1 --Set this option to True if you wish to ignore fields if input value is NULL. By default target field is set to NULL if input value is NULL.
--,FieldsToSetNullIfInputNull='SomeColum1,SomeColumn5,SomeColumn7' --Comma separated CRM entity field names which you like to set as NULL when input value is NULL. This option is ignored if IgnoreFieldsIfInputNull is not set to True.
--,AssignmentRuleId='xxxxx' --rule id to invoke on value assignment
--,UseDefaultAssignmentRule=1 --sets whether you like to use default rule
--,AllOrNone=1 --If true, any failed records in a call cause all changes for the call to be rolled back. Record changes aren't committed unless all records are processed successfully. The default is false. Some records can be processed successfully while others are marked as failed in the call results.
--,OwnerChangeOptions='option1,option2...optionN' -- use one or more options from below. Use '-n' suffix to disable option execution e.g. TransferOpenActivities-n
-->>> Available owner change options: EnforceNewOwnerHasReadAccess,TransferOpenActivities,TransferNotesAndAttachments,TransferOthersOpenOpportunities,TransferOwnedOpenOpportunities,TransferOwnedClosedOpportunities,TransferOwnedOpenCases,TransferAllOwnedCases,TransferContracts,TransferOrders,TransferContacts,TransferArticleOwnedPublishedVersion,TransferArticleOwnedArchivedVersions,TransferArticleAllVersions,KeepAccountTeam,KeepSalesTeam,KeepSalesTeamGrantCurrentOwnerReadWriteAccess,SendEmail
-->>> For more information visit https://zappysys.com/link/?id=10141
--,AllowFieldTruncation=1 --If true, truncate field values that are too long, which is the behavior in API versions 14.0 and earlier.
--,AllowSaveOnDuplicates=1 --Set to true to save the duplicate record. Set to false to prevent the duplicate record from being saved.
--,EnableParallelThreads=1 --Enables sending Data in multiple threads to speedup. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,MaxParallelThreads=6 --Maximum threads to spin off to speedup write operation. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,TempStorageMode='Disk' --or 'Memory'. Use this option to overcome OutOfMemory Error if you processing many rows. This option enables how Temp Storage is used for query processing. Available options 'Disk' or 'Memory' (Default is Memory)
)
External Input from ODBC – INSERT multiple rows from ODBC Source (i.e. CSV) to Salesforce
This example shows how to call INSERT operation which takes multiple rows as input from external system (i.e. MSSQL, ODBC, OLEDB). In this example we specified Driver Type as MSSQL. For other system (i.e.
INSERT INTO Account
SOURCE('ODBC' --external driver type (MSSQL, ODBC, OLEDB)
,'Driver={ZappySys CSV Driver};DataPath=c:\somefile.csv' --driver specific connection string (i.e. MSSQL, ODBC, OLEDB)
,'SELECT Acct_Name as Name,Billing_City as BillingCity,Locations as NumberofLocations__c
FROM $
WITH(
--You can use SRC=xxxxxx or static data using DATA=xxxxxx attribute below (either or). For example purpose we use static data but in real world you will read from file so comment DATA=xxx
--SRC=''c:\file_1.csv''
--SRC=''c:\some*.csv''
--SRC=''https://abc.com/api/somedata-in-csv''
DATA = ''Acct_Name,Billing_City,Locations
Account001,City001,1
Account002,City002,2
Account003,City003,3
''
)'
)
--query for external system (i.e. MSSQL). Output column names in query must match columns found in target table (i.e. Account) this is the reason we used alias in names.
--To see all possible columns in target, select table from dropdown on the preview tab
WITH(
Output=1 /*Other values can be Output='*' , Output=1 , Output=0 , Output='Col1,Col2...ColN'. When Output option is supplied then error is not thrown but you can capture status and message in __RowStatus and __ErrorMessage output columns*/
--,EnableBulkMode=1 --use this to invoke Bulk API (usually slower for less number of rows, works better for large dataset 5K+)
--OR--
,EnableParallelThreads=1 --//Send records in multiple threads for faster data processing (2000 rows sent in each batch). If you use EnableBulkMode=1 then this option is ignored and 500000 rows processed (in V2) in a each batch (in V1 its 10000) using Job Style API rather than Real Time API (faster for less than few hundred rows).
,MaxParallelThreads=6 --//Maximum threads to use for parallel processing
--,IgnoreFieldsIfInputNull=1 --Set this option to True if you wish to ignore fields if input value is NULL. By default target field is set to NULL if input value is NULL.
--,FieldsToSetNullIfInputNull='SomeColum1,SomeColumn5,SomeColumn7' --Comma separated CRM entity field names which you like to set as NULL when input value is NULL. This option is ignored if IgnoreFieldsIfInputNull is not set to True.
--,AssignmentRuleId='xxxxx' --rule id to invoke on value assignment
--,UseDefaultAssignmentRule=1 --sets whether you like to use default rule
--,AllOrNone=1 --If true, any failed records in a call cause all changes for the call to be rolled back. Record changes aren't committed unless all records are processed successfully. The default is false. Some records can be processed successfully while others are marked as failed in the call results.
--,OwnerChangeOptions='option1,option2...optionN' -- use one or more options from below. Use '-n' suffix to disable option execution e.g. TransferOpenActivities-n
-->>> Available owner change options: EnforceNewOwnerHasReadAccess,TransferOpenActivities,TransferNotesAndAttachments,TransferOthersOpenOpportunities,TransferOwnedOpenOpportunities,TransferOwnedClosedOpportunities,TransferOwnedOpenCases,TransferAllOwnedCases,TransferContracts,TransferOrders,TransferContacts,TransferArticleOwnedPublishedVersion,TransferArticleOwnedArchivedVersions,TransferArticleAllVersions,KeepAccountTeam,KeepSalesTeam,KeepSalesTeamGrantCurrentOwnerReadWriteAccess,SendEmail
-->>> For more information visit https://zappysys.com/link/?id=10141
--,AllowFieldTruncation=1 --If true, truncate field values that are too long, which is the behavior in API versions 14.0 and earlier.
--,AllowSaveOnDuplicates=1 --Set to true to save the duplicate record. Set to false to prevent the duplicate record from being saved.
--,EnableParallelThreads=1 --Enables sending Data in multiple threads to speedup. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,MaxParallelThreads=6 --Maximum threads to spin off to speedup write operation. This option is ignored when bulk mode enabled (i.e. EnableBulkMode=1)
--,TempStorageMode='Disk' --or 'Memory'. Use this option to overcome OutOfMemory Error if you processing many rows. This option enables how Temp Storage is used for query processing. Available options 'Disk' or 'Memory' (Default is Memory)
)
Run the same query from SQL Server or your own code.
SQL Server (linked server)
Query the driver from SQL Server through the Data Gateway. The driver does not have to be installed on SQL Server.
-- SQL Server: create a linked server to the ZappySys Data Gateway (here [ZAPPY_GATEWAY]),
-- then run the driver query through OPENQUERY.
SELECT *
FROM OPENQUERY([ZAPPY_GATEWAY], 'SELECT Id, LastName, FirstName
FROM Contact
Where LastName!=''Smith''
ORDER BY LastName, FirstName
LIMIT 10')
C# (System.Data.Odbc)
using System;
using System.Data.Odbc;
// Use a DSN ("DSN=MyZappyDsn;") or name the driver directly
using (var conn = new OdbcConnection("DRIVER={ZappySys Salesforce Driver};"))
{
conn.Open();
var cmd = new OdbcCommand(@"SELECT Id, LastName, FirstName
FROM Contact
Where LastName!='Smith'
ORDER BY LastName, FirstName
LIMIT 10", conn);
using (var rdr = cmd.ExecuteReader())
{
while (rdr.Read())
{
for (int i = 0; i < rdr.FieldCount; i++)
Console.Write("{0}={1} ", rdr.GetName(i), rdr[i]);
Console.WriteLine();
}
}
}
Python (pyodbc)
import pyodbc
# Use a DSN ("DSN=MyZappyDsn;") or name the driver directly
conn = pyodbc.connect("DRIVER={ZappySys Salesforce Driver};")
cursor = conn.cursor()
cursor.execute(r"""
SELECT Id, LastName, FirstName
FROM Contact
Where LastName!='Smith'
ORDER BY LastName, FirstName
LIMIT 10
""")
for row in cursor.fetchall():
print(row)
conn.close()
PowerShell
$conn = New-Object System.Data.Odbc.OdbcConnection
$conn.ConnectionString = "DRIVER={ZappySys Salesforce Driver};" # or "DSN=MyZappyDsn"
$conn.Open()
$cmd = $conn.CreateCommand()
$cmd.CommandText = @'
SELECT Id, LastName, FirstName
FROM Contact
Where LastName!='Smith'
ORDER BY LastName, FirstName
LIMIT 10
'@
$table = New-Object System.Data.DataTable
(New-Object System.Data.Odbc.OdbcDataAdapter($cmd)).Fill($table) | Out-Null
$conn.Close()
$table | Format-Table
Java (JDBC through Data Gateway)
// Java uses the ZappySys Data Gateway and the Microsoft SQL Server JDBC driver.
// On the gateway, add a data source (here "MyZappySource") that uses the ZappySys Salesforce Driver.
import java.sql.*;
String url = "jdbc:sqlserver://localhost:5000;databaseName=MyZappySource;user=MyGatewayUser;password=MyPassword;encrypt=false";
String sql = "SELECT Id, LastName, FirstName\n"
+ "FROM Contact\n"
+ "Where LastName!='Smith'\n"
+ "ORDER BY LastName, FirstName\n"
+ "LIMIT 10";
try (Connection conn = DriverManager.getConnection(url);
Statement st = conn.createStatement();
ResultSet rs = st.executeQuery(sql)) {
while (rs.next()) {
System.out.println(rs.getString(1));
}
}
PHP (odbc_connect)
<?php
$conn = odbc_connect("DRIVER={ZappySys Salesforce Driver};", "", ""); // or "DSN=MyZappyDsn"
$sql = <<<'SQL'
SELECT Id, LastName, FirstName
FROM Contact
Where LastName!='Smith'
ORDER BY LastName, FirstName
LIMIT 10
SQL;
$rs = odbc_exec($conn, $sql);
while ($row = odbc_fetch_array($rs)) {
print_r($row);
}
odbc_close($conn);
Articles
Guides and tutorials for the Salesforce Driver
Compatibility and requirements
Built for Windows, and for your own environment.
- Windows 11, 10, 8 and 7, and Windows Server 2022, 2019, 2016, 2012 R2 and 2008
- .NET Framework 4.x. The JDBC Bridge Driver also needs Java 8 or later
- 32-bit and 64-bit ODBC drivers. SQL Server 2012 through 2025 through the Data Gateway
- Self-hosted: drivers run in your Windows process, business data does not pass through ZappySys servers, and credentials stay in your DSN
- Free trial of ODBC PowerPack: test with your own data before you buy
FAQ
Questions about the Salesforce Driver
Which tools and languages can use this driver?
Any ODBC-compliant tool, such as Power BI, Tableau, Qlik, SSRS, Informatica, Excel and SSIS. You can also connect from Java, C#, Python, PowerShell and other languages with an ODBC connection string.
Do I need to install the driver on SQL Server?
No. With the Data Gateway option the driver runs on the gateway machine and SQL Server connects to it through a linked server.
Which edition includes the Salesforce Driver?
The Salesforce Driver is included in the Professional and Enterprise editions of ODBC PowerPack. See the edition comparison for the full list.
Can I update Salesforce data?
Yes. The driver runs INSERT, UPDATE and DELETE statements and can use the Bulk API for larger loads.
Which SQL Server and Windows versions are supported?
Support for SQL Server 2025, 2022, 2019, 2017, 2016, 2014 and 2012 (32/64 bit) through the Data Gateway. See the system requirements.
Can I try it before buying?
Yes. Download ODBC PowerPack, create a DSN and test your own data before you buy.
Start your free trial today
Install ODBC PowerPack and add a Salesforce Driver DSN.
Preview your data in the driver UI before you connect your tool.
- One DSN, many toolsPower BI, Excel, SSIS, Python and SQL Server can all use it.
- Free trialTest the driver with your own data before you buy.
- Live supportHelp during your trial and after purchase.
Open Help FileBrowse all ODBC PowerPack drivers
New purchases may be eligible for refund review within 30 days. See the refund policy.
Talk to an engineer before or during your trial.