Solution
The
Database Connectivity Toolkit VIs are non-reentrant. This means that only one instance of each VI can execute at a given time. When communicating with multiple databases, the Database Connectivity Toolkit VI must complete it's operation with one database before it can execute for the next database.
This issue can be avoided by creating a copy of the VIs and modifying their reentrant execution. Follow the steps below to achieve this:
- Navigate to C:\Program Files (x86)\National Instruments\LabVIEW <version>\vi.lib\addons\database and open the NI_Database_API.lvlib file.
- This is a LabVIEW library file containing all of the Database Connectivity Toolkit VIs.
- Follow the remaining steps in How Can I Edit and Move Libraries in vi.lib to a Different Location? to create a copy of the library.
- From the copied library, open the VI that requires modifying.
- Press Ctrl+i to open the VI Properties window.
- From the drop-down menu, select Execution.
- Select either Shared clone reentrant execution or Preallocated clone reentrant execution.
- Save the VI.
- Multiple instances of the modified VIs can now execute simultaneously.
Note: Reentrant execution only affects the outer-most VI. If the modified VI contains sub VIs, the sub VIs may also need to be changed if you notice that the VI is still being locked by another execution.