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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Liutauras Medziunas25 reputationPosted Feb 8, 2011, 12:42 PM EST
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();
}
}
}