I create a phone book project. It work fine on visual studio 2015. It has a sqlite database (phonebookDB.sqlite3). I created setup\ installer for my desktop and it install on PC. It had been install and created shortcut icon when i click shortcut icon, it not run and it is not showing any error. I tryed to run to open as administrator but it not run when i create setup file without sqlite code it run fine on windows. i have used visual studio installer to make setup file.
although I don't know anything about the topic I just clicked on it out of curiosity what's it about
unfortunately it's one of those posts hard to read - especially on mobile devices with small screens:
a) coderanch supports the BBCode standard - which one part of it is the code-tag
it also supports common languages like java, c/++ and even c# - this makes it way easier to read code as it gets formatted properly and also syntax highlightet - a moderator may correct it this time for you
b) although images often do help in situations were "it's useful to see what you see", but I don't see it helps on your topic as you just show us some IDE stuff but the issue you described happens outside of the IDE
c) "it does not work" is not a very helpful way of describing the issue - it often helps better if you describe what you expect to happen, what does actually happen, and maybe post some error log you get
as for the issue itself:
do you have any debug-log in your programm? have you tried it running from the commandline instead of double-click on the short cut? does your installer make sure the privileges are set correctly or to place specific files in specific places? does your code has any fail-fast lines in it where it just exists the programm in case if anything fails?
from what I see: you have an empty catch-block:
I can only say from java: never ever do this - what you'Re doing here is you hide any error message that could be printed to log - in java there's Throwable.printStackTrace - in C# it seem to be this:
this way you'll get at least a log output why it failed (I predict some privilege issue here)
I added code tags to your post so that it is more easily to read. Next time, please add them yourself like [code]this[/code], and use the "Preview" button to see if everything looks nice before you submit your post.
You're likely not getting an error message because you're silently catching exceptions. NEVER have an empty catch block.
You're mixing presentation code with database access code. You shouldn't be accessing databases directly from your event handlers. Instead, create a class that encapsulates your database operations, and when an exception is thrown, wrap the exceptions in more appropriate ones, which you can then handle in your event handlers:
Your form can then look something like this:
You can't have everything. Where would you put it?
Devious Experiments for a Truly Passive Greenhouse!