

If you have any compliments or complaints to

This can be beneficial to other community members reading this thread. Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. Sql = "insert into highscores (name, score) values ('Me', 9001)" Ĭommand = new SQLiteCommand(sql, m_dbConnection) ģ.Find the database file in the project> bin> Debug> MyDatabase.sqliteĤ.Add this file to the project, then publish it. SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection) String sql = "create table highscores (name varchar(20), score int)" SQLiteConnection m_dbConnection = new SQLiteConnection("Data Source=MyDatabase.sqlite Version=3 ") SQLiteConnection.CreateFile(" MyDatabase.sqlite") More details you can refer to following steps.ġ.Right click the project> Manage Nuget Packages> You just add the SQLite.dll to your project.Īfter publishing it, the user can access the data from the data file. You don't need to install SQL Server Express to use LocalDB, as LocalDB is SQL Server Express.īesides, I have a suggestion that you can use the to store the data as a database file, which is not need to install the sqlserver express or sqlserver expressLocalDB. You can either try to replace (LocalDb)\MSSQLLocalDB by (LocalDb)\v11.0 or recreate Projects instance using SqlLocalDB utility. It seems like (localdb)\Projects instance got deleted. Īny help or any articles that are probably more detailed about this deployement would be soooooo much appreciated guys please, for now i want to try advanced installed maybe its worth it, thanks in advance

Its actually working just fine on my machine but when i try to install it on another machine it gave me this exception that the specified LocalDB Instance does not exist which is driving me crazy. net framework 4.6.1 and sql server express 2012 and sql server express 2012 LocalDB To give you guys more info, i have in my Setup : application folder : the exe itself with shortcut created and icon and the two. SqlConnection cnx = new SqlConnection Source = (LocalDB)\MSSQLLocalDB AttachDbFilename=|DataDirectory|\Database1.mdf Integrated Security = True ") SqlConnection cnx = new Source=DESKTOP-8LAJ1BB Initial Catalog=The_Book Integrated Security=True") īut when i wanted to deploy it knowing that it surely wouldnt work, i put my database on visual and changed the connection string to this : Hello guys, its been a week that im stuck on this deployement thing, i read alot of articles still couldnt get through this, to specify my problem i created an app in winforms with an sql server database i followed the method of creating a SETUP toĭeploy my app ofcourse i changed my connection string cuz at first i had it like this
