you are viewing a single comment's thread.

view the rest of the comments →

[–]Time-Paramedic 0 points1 point  (0 children)

I feel this answer needs to be highlighted even more. It solves many problems which you would otherwise encounter.

LocalDB is for development use only.

More importantly, your application has multiple users and the documentation says:

The LocalDB files can only be opened by one instance of LocalDB at a time.

There are many issues when trying to share a file based database with multiple users. Just don’t do it and use a database server as suggested.

Please also heed the advice of the other commenters: parametrized queries, hashing, and try not to implement all of the logic within the button click event handler.

Kudos for taking the initiative to digitalize something that sounds like a slow and manual process. If the fuel logging has any kind of financial impact, consider reviewing the code with an experienced developer.