The above code would not even compile (your class types are wrong), and you are missing the actual connection string; your code should be something like:
SqlCeConnection con = new SqlCeConnection(Properties.Settings.Default.DBConnection);
con.Open();