how to embed a sql dsatabase into c# project and then how to make exe file of that
plz ans me and if possible in detail..........
thnx
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Liutauras MedziunasPosted Feb 8, 2011, 5:42 PM
Just open Visual Studio Solution Explorer then click right mouse button on project and Add New Item -> Data -> Service based database or Local database after complete the wizard.
It automatic generates the Database1ConnectionString.
Now you have SQL ce or SQL server database and you can use it:
class Program
{
public static void Main()
{
using (SqlCeConnection con = new SqlCeConnection(Properties.Settings.Default.Database1ConnectionString))
{
con.Open();
}
}
}