我试图将数据插入我的紧凑型数据库,我收到了这个错误:
There was an error parsing the query. [ Token line number = 1,Token line offset = 1,Token in error = USE ]
这是我的代码,主要是在网上找到的:
SqlCeConnection conn = new SqlCeConnection(@"Data Source=|DataDirectory|\CompactDatabase.sdf");
conn.Open();
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "USE Movie INSERT INTO Movie(title, ean) VALUES(?,?)";
cmd.Parameters.AddWithValue("@title", title);
cmd.Parameters.AddWithValue("@ean", ean);
cmd.Prepare();
cmd.ExecuteNonQuery();
有人找出问题所在吗?