We want to add a table programmatically to our local stored Microsoft SQL Server Compact 3.5 Database. The code below creates the table.
using (SqlCeConnection con =
new SqlCeConnection("Data Source=|DataDirectory|\\Database.sdf"))
{
con.Open();
using (SqlCeCommand com =
new SqlCeCommand("create table test (id int not null)", con))
{
Console.WriteLine("Response: " + com.ExecuteNonQuery());
}
con.Close();
}
The code is working fine, but the table isn't listed up in the Server Explorer of the specified database table. We can insert values into the table and read data out of the table.
Do you know any solutions for this problem?
Afterwards we want to add a dynamic datamodel, which we want to use as a provider of our tables.
Thank you in advance.