I am experimenting with implementing SQLite in Labwindows/CVI. The SQL code executes and yields the expected results, but I receive a GPF when the program exits. If I separate the SQL code into its own function, the GPF occurs when the function is exited. It has been a long time since I have used C and I am not sure how to determine the cause of this error. Any help would be greatly appreciated.
Labwindows/CVI 2020
Windows 10
I have attached the source code and database as well as an image of the GPF and the output.