Reputation: 512
I currently access & write data to/from text files but want to make a move over to SQL Server (Also not yet sure which version). Note: This is a Windows Desktop, Windows Forms Application.
My application uses a DB (Single user) & I want to deploy JUST the EXE file, no additional DB/Access tables etc (I want to use SQL Server rather than MSAccess anyway).
What would be the best way to install the tables of the DB onto my users machines? (I also don't want to use MSI installers etc, JUST an EXE file).
Upvotes: 0
Views: 3553
Reputation: 727
Assuming there is an instance of SQL Server available on the client, you could use my company's product BuildMaster to create this EXE for you. Once you've installed it you can:
This generated EXE can run with optional arguments (e.g. a custom connection string) as specified in the Using the Change Script Package documentation. Also note that it will only run the scripts one time against the target database. For more information about that, you can read the change script documentation.
Not surprisingly, this is how we deploy BuildMaster's database itself; the tool is contained within the installer as an embedded resource and then written to disk and executed by the installer.
Upvotes: 1
Reputation: 14941
SQL Server isn't designed to be embedded into applications. Consider using an embed-able SQL database such as SQLLite or SQL Server Compact. You can also use certain methods to install SQL Server Express with your application.
Upvotes: 1