Click here to Skip to main content
15,879,490 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Okay, the question has been asked multiple times, and I have research and tried several solutions and suggestions from different forums/exchange sites. I'm new to vb.
I'm working on a small project that requires database(sqlite), and I access the db like this:
VB
Dim con As New SQLiteConnection("Data Source=C:\proj1\db1.db")


Every thing works as expected on my system, but when i create .exe file of the project and install the .exe file on other system, it doesnt work since there is no database file. what should I do?

What I have tried:

I have tried this one How do I include my SQLite database in my published vb.net project? - Stack Overflow[^]
Posted
Updated 15-Jul-21 5:19am
Comments
RedDk 20-Jun-18 20:51pm    
Try including the database file. I can read this article and I can see that it's about a deployment. The pseudofact remains though, that I can manage packages through my VS installation and that management typically will install assemblies to the GAC but ... that's probably the reason your package doesn't work. There's no SQLite assembly installed.

How did you reference System.Data.SQLite, if you don't mind me asking?
Member 12755105 20-Jun-18 21:24pm    
I feel so stupid, I've resolved the problem by simply putting the .dB file to my main project folder and change the data source string to db1.db. Besides, I have to add the .dB file manually during the setup build to application folder where all the assembly files are inside. Now it works. Thanks anyway

1 solution

you can help me I have some problems?
 
Share this answer
 
Comments
Richard Deeming 15-Jul-21 11:45am    
"Me too" is not a solution to this question.

If you want to post a comment, click the "Have a Question or Comment?" button under the question.

Do not post your comment as a "solution".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900