We want to add the table programmatically to our local Microsoft SQL Server Compact 3.5 database. The code below creates a 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 works fine, but the table is not listed in the server explorer of the specified database table. We can insert values ββinto the table and read data from the table.
Do you know any solutions to this problem?
Subsequently, we want to add a dynamic datamodel that we want to use as a provider of our tables.
Thanks in advance.
source share