I have a C# application which connects to a SQL Server database. Everything works well(select, insert, update, delete, etc.). I decided to take my application, database files to a new computer. I knew before that it wouldn’t work. I made changes to my application, tried connection string for attached database file, but no luck. It seems I need database driver. But it’s not the end. I need to set up database parameters(logins, instance, etc.).
Do I need to install SQL Server(I think it’s very bad practice) or is it possible to do it with installer programs? Any thoughts, links would be great. Thanks in advance.
I have a C# application which connects to a SQL Server database. Everything works
Share
if it’s a small/medium load program with no much SQL features in (and I think it is), I recommend you to use SQL CE (Compact Edition).
it will be just a DLL that will be included in your program, and it has the driver required to connect to your database, with no other dependencies.
introduction to SQL CE and VS2010 SP1: http://weblogs.asp.net/scottgu/archive/2011/01/11/vs-2010-sp1-and-sql-ce.aspx
just make sure that you have VisualStudio 2010 with SP1 installed before installing SQL CE.
SQL CE Download link: http://go.microsoft.com/fwlink/?LinkId=212219
from ScottGu’s blog: