1. Create the [ODBCINST.INI] section. The ODBC Administrator uses the information in this section to determine the database drivers that have been installed.
    res = RegCreateKeyEx (HKEY_LOCAL_MACHINE,"SOFTWARE\\ODBC\\ODBCINST.INI", 0x00, 
      (LPTSTR) "REG_SZ", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &disposition);
  2. Create the [ODBC Drivers] section under [ODBCINST.INI] and add a section to [ODBC Drivers] for each driver.

    Specify a descriptive name for each installed driver.

    The following C example creates the [ODBC Drivers] section in the Registry and adds sections to them for the MongoDB driver.

    res = RegCreateKeyEx (HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBCINST.INI\\ODBC Drivers", 0x00, 
      (LPTSTR) "REG_SZ", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &disposition);
    res = RegSetValueEx (key, (LPCTSTR) "DataDirect MongoDB, 0x00, REG_SZ,
      (CONST BYTE *) "Installed", 10); 
  3. Add required keys for the drivers to [ODBCINST.INI]. See "Keys and values" for a complete list of the keys and their values for each driver. For additional information about driver attribute keywords, refer to the Microsoft Programmer’s ODBC documentation.

    The following keys are required for relational databases:

    APILevel

    ConnectFunctions

    CPTimeout

    Driver

    DriverODBCVer

    JarFile1
    FileUsage

    HelpRootDirectory (UNIX Administrator only)

    Setup (UNIX Administrator only)

    SQLLevel

    UsageCount

    The following C example adds these keys for the MongoDB driver in the Registry, using CD as the prefix for the driver file name (nn would be replaced with the driver level number):

    res = RegCreateKeyEx (HKEY_LOCAL_MACHINE, "SOFTWARE\\ODBC\\ODBCINST.INI\\DataDirect MongoDB
      (*.DBF)", 0x00, (LPTSTR) "REG_SZ", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL,
      &key, &disposition);
    res = RegSetValueEx (key, (LPCTSTR) "APILevel", 0x00, REG_SZ, (CONST BYTE *) "1", 26);
    res = RegSetValueEx (key, (LPCTSTR "ConnectFunctions", 0x00, REG_SZ, (CONST BYTE *) "YYY", 26);
    res = RegSetValueEx (key, (LPCTSTR) "CPTimeout", 0x00, REG_SZ, (CONST BYTE *) "60", 26);
    res = RegSetValueEx (key, (LPCTSTR) "Driver", 0x00, REG_SZ, (CONST BYTE *)
      "C:\\PROGRAM FILES\\YOURCOMPANY\\DRIVERS\CDmongonn.DLL", 26);
    res = RegSetValueEx (key, (LPCTSTR) "DriverODBCVer", 0x00, REG_SZ, (CONST BYTE *) "03.52", 26);
    res = RegSetValueEx (key, (LPCTSTR) "FileExtns", 0x00, REG_SZ, (CONST BYTE *) "*.dbf", 26);
    res = RegSetValueEx (key, (LPCTSTR) "FileUsage", 0x00, REG_SZ, (CONST BYTE *) "1", 26);
    res = RegSetValueEx (key, (LPCTSTR) "HelpRootDirectory", 0x00, REG_SZ, (CONST BYTE *)
      "C:\\PROGRAM FILES\\YOURCOMPANY\\MongoDBHelp", 26);
    res = RegSetValueEx (key, (LPCTSTR) "Setup", 0x00, REG_SZ, (CONST BYTE *)
      "C:\\PROGRAM FILES\\YOURCOMPANY\\DRIVERS\CDmongonns.DLL", 26);
    res = RegSetValueEx (key, (LPCTSTR) "SQLLevel", 0x00, REG_SZ, (CONST BYTE *) "0", 26);
    res = RegSetValueEx (key, (LPCTSTR) "UsageCount", 0x00, REG_SZ, (CONST BYTE *) "1", 26);
    res = RegSetValueEx (key, (LPCTSTR) "JarFile", 0x00, REG_SZ, (CONST BYTE *) "C:\\PROGRAM FILES\\YOURCOMPANY\\DRIVERS\\JAVA\LIB\mongodb.jar", 26);
    RegCloseKey (key);

    For most drivers, the Setup= keyword has the same value as the Driver= keyword. For MongoDB and some other drivers, the Setup= keyword has the same value as the Driver= keyword except for the addition of an S before the file name extension. See "Keys and values" for details about these key values for each driver.

1 The JarFile key applies only to the Aha!, Apache Cassandra, GitHub, Google Analytics 4, Google BigQuery, HubSpot, Microsoft Dynamics 365, Microsoft SharePoint, MongoDB, Oracle Service Cloud, Salesforce, SAP S/4HANA, Snowflake, and TeamCity drivers. It is optional as long as the driver’s jar file is added to the runtime environment’s CLASSPATH using a different supported method. For details, see Step 2 in “Overview of installation.”