Ready to get started?

Download a free trial of the HCL Domino ODBC Driver to get started:

 Download Now

Learn more:

HCL Domino Icon HCL Domino ODBC Driver

The HCL Domino ODBC Driver is a powerful tool that allows you to connect with live data from HCL Domino, directly from any applications that support ODBC connectivity.

Access HCL Domino data like you would a database - read, write, and update HCL Domino FALSE, etc. through a standard ODBC Driver interface.

Using the CData ODBC Driver for HCL Domino in PyCharm



Connect to HCL Domino as an ODBC data source in PyCharm using the CData ODBC Driver for HCL Domino.

The CData ODBC Drivers can be used in any environment that supports loading an ODBC Driver. In this tutorial we will explore using the CData ODBC Driver for HCL Domino from within PyCharm. Included are steps for adding the CData ODBC Driver as a data source, as well as basic PyCharm code to query the data source and display results.

To begin, this tutorial will assume that you have already installed the CData ODBC Driver for HCL Domino as well as PyCharm.

Add Pyodbc to the Project

Follow the steps below to add the pyodbc module to your project.

  1. Click File -> Settings to open the project settings window.
  2. Click Project Interpreter from the Project: YourProjectName menu.
  3. To add pyodbc, click the + button and enter pyodbc.
  4. Click Install Package to install pyodbc.

Connect to HCL Domino

You can now connect with an ODBC connection string or a DSN. See the Getting Started section in the CData driver documentation for a guide to creating a DSN on your OS.

Prerequisites

The connector requires the Proton component to be installed. Normally, Proton is distributed as part of the AppDev pack. See the HCL documentation for instructions on acquiring and installing Proton or the AppDev pack.

Once the Proton service is installed and running, you will also need to create a user account and download its Internet certificate. This certificate can be used to set the connector certificate connection properties.

Authenticating to Domino

  • Server: The name or IP address of the server running Domino with the Proton service.
  • Port: The port number that the Proton service is listening on.
  • Database: The name of the database file, including the .nsf extension.
  • SSLClientCertType: This must match the format of the certificate file. Typically this will be either PEMKEY_FILE for .pem certificates or PFXFILE for .pfx certificates.
  • SSLClientCert: The path to the certificate file.
  • SSLServerCert: This can be set to (*) if you trust the server. This is usually the case, but if you want to perform SSL validation, you may provide a certificate or thumbprint instead. See the documentation for SSLServerCert for details.

Additional Server Configuration

The connector supports querying Domino views if any are defined. Before views can be queried by the connector they must be registered with the design catalog.

Please refer to the Catalog Administration section of the AppDev pack documentation for details on how to do this.

Below is the syntax for a DSN:

[CData Domino Source] Driver = CData ODBC Driver for HCL Domino Description = My Description Server = https://domino.corp.com Database = names.nsf Port = 3002 SSLClientCertType = PEMKEY_FILE SSLClientCert = full_path_of_certificate.pem SSLServerCert = *

Execute SQL to HCL Domino

Instantiate a Cursor and use the execute method of the Cursor class to execute any SQL statement.

import pyodbc cnxn = pyodbc.connect('DRIVER={CData ODBC Driver for Domino};Server = https://domino.corp.com;Database = names.nsf;Port = 3002;SSLClientCertType = PEMKEY_FILE;SSLClientCert = full_path_of_certificate.pem;SSLServerCert = *') cursor = cnxn.cursor() cursor.execute("SELECT Name, Address FROM ByName WHERE City = 'Miami'") rows = cursor.fetchall() for row in rows: print(row.Name, row.Address)

After connecting to HCL Domino in PyCharm using the CData ODBC Driver, you will be able to build Python apps with access to HCL Domino data as if it were a standard database. If you have any questions, comments, or feedback regarding this tutorial, please contact us at support@cdata.com.