此方法是 Windows CE/CF/.NET1.1 项目的一部分:
public void createSettingsTable()
{
public string filename = "\\my documents\\CCRDB.SDF";
string conStr = "Data Source = " + filename;
try
{
using (SqlCeConnection con = new SqlCeConnection(conStr)
{
con.Open();
using (SqlCeCommand com = new SqlCeCommand("create table ccr_settings (setting_id INT IDENTITY NOT NULL PRIMARY KEY, setting_name varchar(40) not null, setting_value(63) varchar not null)", con))
{
com.ExecuteNonQuery();
}
con.Close();
}
}
catch (Exception ex)
{
CCR.ExceptionHandler(ex, "createSettingsTable");
}
}
...似乎被编译器视为完全陌生的东西。以下是我粘贴时它导致的错误消息列表: