Best way to package a database with an application

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
21,886
I have this demo for a client. I am running SQL as the back end database. What is the best way for him to get the program and simply run it, without having to attach a database and all that rigmarole; SqlExpress?
 

deweyzeph

Honorary Master
Joined
Apr 17, 2009
Messages
10,544
I have this demo for a client. I am running SQL as the back end database. What is the best way for him to get the program and simply run it, without having to attach a database and all that rigmarole; SqlExpress?

You would need to convert it to a SQL Server Compact database, which is an embedded SQL server database system. Would be the easiest way to do it without actually installing a full instance of SQL Server Express.

https://www.microsoft.com/en-us/download/details.aspx?id=17876
 

werfie

Expert Member
Joined
Aug 16, 2010
Messages
2,626
Write a routine in your program that creates the database? You will need something like this to update the database in future as well.
 

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
21,886
You would need to convert it to a SQL Server Compact database, which is an embedded SQL server database system. Would be the easiest way to do it without actually installing a full instance of SQL Server Express.

https://www.microsoft.com/en-us/download/details.aspx?id=17876

Write a routine in your program that creates the database? You will need something like this to update the database in future as well.

Ok I've gone with a combination of both. SQL Server Compact database. Also if they so choose, they can run a procedure to create a SQL Server database proper and all it's tables, insert some default data to get things started.

Was a bit of a mission, had to implement a login form with the database details/user authentication.
 
Last edited:
Top