VS2022 installer with Sqlite db
(1) By anonymous on 2022-11-13 17:30:03 [link] [source]
What should I know about the VS2022 installer with Sqlite db in the debug/release folder? I create an installation/setup package and the program does not execute. I get a spinner for a few seconds and then nothing.
I was hoping that the db could reside in the exe. Was this wrong?
(2) By Simon Slavin (slavin) on 2022-11-13 20:03:17 in reply to 1 [link] [source]
It is not normal to 'install' SQLite on a computer and expect every program which uses SQLite to find your installation.
Instead, programmers are expected to include SQLite in their project. There's a special 'slimmed down' set of source code specially designed for this. This allowed many different programs to each use SQLite, using different versions, without running into situations where updating SQLite because one program insists on it stops other programs from working.
If you are using a program which doesn't include SQLite inside itself, but expects to find SQLite already installed somewhere on your computer, you will need to refer to instructions for that specific program to figure out any installation problems.
(3) By anonymous on 2022-11-13 21:35:10 in reply to 2 [link] [source]
Thank you Simon!
My question was unclear and I apologize. I wrote a VB.NET application and am using Sqlite (which is very impressive). The testing version (in debug) works well. I am using the VS2022 installer to create a msi file to distribute to my friends.
My question was meant to ask was "what files do I include in the application folder when I create the msi in VS2022", The VS2022 automatically includes all DLLs that I used in the debug version. But it did not include the sqlite database (Mydata.db).
I assume that I must manually include Mydata.db. Is there anything else that Sqlite needs to be manually loaded? The SQLitePVLRaw.core.dll is already included.
Is that all that I need to make a msi !
(4) By Chris Locke (chrisjlocke1) on 2022-11-13 23:45:31 in reply to 3 [link] [source]
Usually, as long as everything is in the debug directory, that should be enough.
You can use VirtualBox to create a virtual PC and test your creation in a clean environment. You'll obviously need to know what framework you used, so others can install the necessary .Net framework.
Just a suggestion, but an .msi may be overkill. You could just .zip up the debug directory (or release... if you've released it) and make that a self-extracting .exe - 7zip does this nicely. The reason being is that you're going to ship an update ... and maybe another ... and its easier for others to just download the new .exe and not a huge MSI which contains a lot of fluff.
Out of interest (just being nosy) how come you've gone the SQLitePVLRaw library route, and not system.data.sqlite.dll route. I do a lot of database stuff using vb.net using the latter library and have found it very easy.
(5) By anonymous on 2022-11-14 00:59:21 in reply to 4 [source]
Hi Chris,
Thanks for the advice!
This is my first foray into VB.net. I was recommended to use SQLite. I am a SQLServer user starting with version 6.5 (back in the late 90's.)
The vb.net version that I coded in was in .NET Framework 4.7.2. My code imports system.dada.sqlite.
SQLitePVLRaw library route question is, I guess, becuause the DLLs that are in my debug folder shows them: SQLitePCLRaw.batteries_v2.dll SQLitePCLRaw.core.dll SQLitePCLRaw.provider.dynamic_cdecl.dll
What am I doing wrong?
Thanks for your guidance!
(6.3) By Aask (AAsk1902) on 2022-11-14 13:27:31 edited from 6.2 in reply to 3 [link] [source]
The VS2022 automatically includes all DLLs that I used in the debug version. But it did not include the sqlite database (Mydata.db).
Any files (including a *.db or a * .DLL) file added to your Visual Studio project will be automatically copied to your \bin\Debug and/or your \bin\Release folder when you have told Visual Studio to do so.
- Right-click on your project in Solution Explorer
- Select the Add option from the pop up menu
- Add (as existing item) your file (your *.DB file); select All Files else a DB file will not appear in the dialogue.
- Select (right-click) the new entry entry, your *.db, in Solution Explorer and select Properties
- Set the Copy to Output Directory property to Copy Always in the the drop-down option list
- Rebuild your assembly.
Check your \bin\Debug and/or your \bin\Release folders; your newly added *.db file should be there.
(7) By anonymous on 2022-11-14 14:53:33 in reply to 6.3 [link] [source]
Thank you, AAsk1902 !
I am so lost! I will work on this tonight after I finish work today.
It seems that when I create the msi, the setup of it works but the icon goes into a short spinner and then dies.
Also, if I change the application to "release" in VS022, build and run, I get a sqlite unhandled exception: System.Data.SQLite.SQLiteException: "SQL logic error no such table: tblMailingList"
and a line is flagged and highlighted: UnprintedRecords = InventoryUnprintedRecords_CMD.ExecuteScaral() with the error above.
Yet, when I change the solution and project back to "debug(active)", everything works well and no unhandled exceptions.
Thanks for your guidance. As soon as I learn, I will pay it back by getting active on this site helping others who are novices in this like me.
I really appreciate you and your other peers who are helping me!
(8) By anonymous on 2024-03-06 10:59:28 in reply to 7 [link] [source]
Hello, I too facing the same problem. Did you find the solution?. It would be help full if you can share the solution. Thanks.
(9) By Chris Locke (chrisjlocke1) on 2024-04-25 06:51:27 in reply to 8 [link] [source]
In your release folder, have you created the x86 and x64 directories with the necessary DLLs, and placed your database as per the 'debug' folder? The release and debug folders should mirror each other .. ie, have the same files in them (not link via shortcuts, but have real solid files)