SQLite Library Path input for Open Connection: check whether file exists

Issue #9 resolved
Ivan Yakushchenko created an issue

It would be nice that during Open Connection, there will be check that SQLite Library Path really exists. Now there is just check that path is valid.

Our team had the following use case.

  1. We’ve created copy of SQLite library, and added it to git repository.
  2. Git repository has .gitignore, which ignores dll files.
  3. While running the code on other machines than the one where library was initially added, the following error occured:

Error 7 occurred at Call Library Function Node in SQLitemod.lvlib:Connection.lvclass:Open (DD).vi->Untitled 10

Possible reason(s):

LabVIEW: File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.

Nonexistent GPIB interface.

4. We were troubleshooting path to database file, but then realized that this error means that dll is not found → because modified toolkit expected dll files locally (in repository), while dll files did not exist there (due to .gitignore file).

So maybe additional condition check could be added, to generate more descriptive error message:

Thank you very much,

Sincerely, Ivan.

Comments (6)

  1. James Powell repo owner

    Error message seems quite clear to me: “Error 7: File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.” What is the extra information that would have helped you identify your problem earlier?

  2. Ivan Yakushchenko reporter

    Path which was passed into the function. If file is not found - then there is wrong path, so it would be helpful to see what is that path exactly.

  3. James Powell repo owner

    OK, adding the list of file paths if there is any error on open, plus the db path. Like this:

    Database File Path:
    :memory:
    File Paths tried for SQLite Dynamic Library:
    C:\Git\sqlite-labview\data\sqlite3.*
    C:\Git\sqlite-labview\SQL Connection\sqlite3.*

  4. Log in to comment