3

Every application I use to initiate an ODBC connection that I've created to my IBM Notes 9 DB results in getting an error during connect:

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed

I have scoured the web trying to correct this and have not been able to find an answer that solves for this issue on my machine. I am able to open and access the Lotus Notes DB within the Notes 9 software. I am able to create the ODBC System DSN and I know that it's connecting to the server properly because all of the available .nsf files populate in the "Database:" dropdown menu when going through the new ODBC connection setup. I am able to see my username which gets populated from my Notes ID file. The issue occurs when I use something to initiate the ODBC connection. I have tried Excel, QlikView, AQT, Teradata SQL Assistant all with the same result. Once I choose the ODBC connection that I've created, and click on "Ok" in each application I've attempted this with, I am met with the same error above.

I used Event Viewer per a suggestion in an older post online and received the message below:

Could not load NSQLE32.EXE. This file must exist in the same directory NSQL32.DLL and NSQLV32.DLL is in. It is possible NSQLE32.EXE could not be loaded because NotesSQL couldn't locate a valid Notes/Domino installation (couldn't find NNOTES.DLL) -- this may be because user (MYUSERID) does not have the correct rights to the Notes/Domino directory. It could also be because NotesSQL can not find your Notes/Domino installation in the Registry. NotesSQL looks for the NNOTES.DLL file by looking in the path pointed to by the following Registry entries -- HKEY_LOCAL_MACHINE\Software\Lotus\Notes{version}\Path : HKEY_LOCAL_MACHINE\Software\Lotus\Domino{version}\Path. If neither of these registry entries exist or they point to an invalid version of Notes/Domino NotesSQL will not work. To resolve -- please re-install Notes/Domino.

Some notes (no pun intended) and things I've done:

  • Verified that the DLLs mentioned in Event Viewer do exist in the proper directories.

  • Run the Nsql_ALM.exe application to configure the NotesSQL driver.

  • Used the 32-bit ODBC Administrator because my Notes 9 is 32 bit, as well as the driver. The 64 bit driver would not even allow installation (attempted this after hitting this roadblock) but the 32 bit installed successfully.

  • Modified my System Environment Variable for Path to include the true location to notes.ini, which resides in:

    • C:\Users\MYUSERID\AppData\Local\Lotus\Notes\Data
  • Modified my System Environment Variable for Path to include the location to the NotesSQL driver, which resides in:

    • C:\NotesSQL
  • Modified my registry to ensure that the appropriate strings exist to reference the proper files:

    • HKEY_CURRENT_USER\Software\Lotus\Notes\NotesIniPath (to notes.ini)

    • HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Notes\9.0\Path (to notes application)

    • HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Notes\9.0\DataPath (to notes.ini)

    • HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Domino\9.0\Path (to notes application)

    • HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\Domino\9.0\DataPath (to notes.ini)

  • Set the NSQLE32.exe application to run in compatibility mode with all other options.

  • Attempted with everything run as administrator.

  • Uninstalled both Notes and NotesSQL and reinstalled everything cleanly again.

  • Attempted a log via Tracing within ODBC Administrator and it will not create a log file when I am attempting the connection. It will populate, however, with all of the system ODBC connections when the calling application attempts a lookup of the existing connections to populate in the dropdown menu. If I start tracing after the dropdown menu has been populated, then attempted the ODBC connection, even multiple times and with multiple versions, a new log file is never created.

I'm not sure where to go from here. Has anybody had this issue and is there something else that I can do in order to fix it?

TallTed
  • 9,069
  • 2
  • 22
  • 37
Greg
  • 31
  • 2
  • Are you running on 64-bit Windows? If so, the Registry paths that your 32-bit software looks to (as seen in the 64-bit Registry Editor), and so you need to check, should be changed from `HKEY_CURRENT_USER\Software\Lotus\...` to `HKEY_CURRENT_USER\Software\Wow6432Node\Lotus\...`, and from `\HKEY_LOCAL_MACHINE\SOFTWARE\Lotus\...` to `\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Lotus\...` – TallTed Jan 17 '19 at 20:45
  • Yes, I am on 64-bit Windows 10. Thank you for the suggestion. I just tried this in any Lotus or Domino registry directory under Wow6432Node and added Path or DataPath to any folder that did not already include it, rebooted, and the issue still persists. – Greg Jan 17 '19 at 21:45
  • (1) Adding infinite Registry keys is not a good plan, for many reasons. You should only have the ones they advised, just with the additional `Wow6432Node` branch in the key paths. You said you tried "with everything run as administrator" -- but did this include when you "reinstalled everything cleanly again"? Windows 10 permissions may not be set properly, if not installed as administrator. (2) Are you using only 32-bit (not 64-bit) ODBC client applications and only System (not User) DSNs? – TallTed Jan 18 '19 at 02:13
  • I will try uninstalling everything and reinstalling once again after the registry is cleaned of the additional registry strings I created to ensure that I'm including the Wow6432Node only. I did reinstall everything cleanly as administrator, but I will pay close attention to it when I reinstall once again. I am using the 32 bit ODBC Administrator and I am only using System DSNs, not creating a User DSN. I will post back with results of the uninstall / registry changes that I made and reinstalling as administrator and only including the Wow6432Node registry changes. – Greg Jan 18 '19 at 15:28
  • 1
    To be clearer -- _Are your "Excel, QlikView, AQT, Teradata SQL Assistant" all 32-bit apps?_ If these are 64-bit, they cannot (directly) use the 32-bit ODBC driver/DSN, and that would explain why you see errors with them, and not with the 32-bit Administrator. In this case, you'll need to either switch to a 64-bit ODBC driver for Notes 9, or add a [64-bit ODBC Driver for 32-bit ODBC Data Sources](https://uda.openlinksw.com/odbc-odbc-mt/). – TallTed Jan 18 '19 at 16:15
  • All of the applications used to attempt to utilize the ODBC connection are 32 bit. Where it's available, I've even attempted to use the 64 bit versions of those applications and selected the option to force 32 bit with the same results. I also uninstalled everything per my prior comment and reinstalled everything run as administrator. I updated the Wow6432Node registry items and still the issue is occurring. Unfortunately my company will not allow me to install software from this location, so that option is off the table. – Greg Jan 18 '19 at 17:50
  • I got it to work!! All I did was run the querying application in administrator mode and it worked without issue. – Greg Jan 18 '19 at 20:16
  • OK. That means there's a permissions issue in your environment. I can't tell you just how to fix that, but I recommend you work on it (possibly with a new question), to prevent more issues down the line. – TallTed Jan 22 '19 at 04:55

1 Answers1

0

I was able to correct the issue based on information in the Event Logs (Windows - Application) indicating that the Notes.INI file could not be located. I first added the location of notes.ini to the user and system environment variables, however, the issue persisted. I then moved notes.ini to the c:\NotesSQL folder where database connectivity dll's such as NSQL32.dll are found. This corrected the issue.

The application calling notes is SAP BusinessObjects Edge (Enterprise - Crystal Reports) 4.2 SP07.

notes.ini can not be found - Windows application event log