|
QLCE问题:分析查询时出错。 [ Token line number = 1,Token line offset = 15,Token in error =
[复制链接]
int a, b;
a = dataGrid1.CurrentCell.ColumnNumber;
b = dataGrid1.CurrentCell.RowNumber;
dataGrid1[b, a] = textBox1.Text;
SqlCeConnection conn = new SqlCeConnection("Data Source=Test.sdf");
conn.Open();
SqlCeDataAdapter thisAdapter = new SqlCeDataAdapter("SELECT proID,data,date,wmdata from Table1", conn);
DataSet thisDataSet = new DataSet();
thisAdapter.Fill(thisDataSet, "Table1");
string cmd = "update Table1 " + getColumnHeader(a) + "='" + textBox1.Text.Trim() + "' where id='b'";
SqlCeCommand sqlcmd = new SqlCeCommand(cmd, conn);
sqlcmd.ExecuteNonQuery();
conn.Close();
以下是我出错部分的程序代码
请高手帮忙解决问题
|
|