how to write a portable application using an SQL Database with Visual Studio
Posted on 2012-03-12
I have been programming in visual basic for years, and I typically use Access Databases as containers for my data. My most recent project has forced me to save some image files to my database, and allthough I have kept them to a minimum, size is quickly becoming an issue. I know that I can use an SQL database with SQL Express, and can double the available size of my database to 4 GB, and much more than that if my clients want to use a dedicated SQL server with a full version of SQL on it...
My question is how do I go about using an SQL database in my app, configuring the connection string, and copying the database to the target computer... so that my application remains portable, and easily installed (Without requiring me to manually configure their server after the app is installed)...
I am sure this can be done, but as I said I have been using access databases exclusively for years, and don't have any idea of how to transfer an SQL database to another PC programatically, or how to configure the connection string so that it will reconnect once it has been copied.