private void button4_Click_1(object sender, EventArgs e)
{
string s = textBox1.Text;
SqlCeConnection conn = new SqlCeConnection(@"Data Source=D:\Desktop\DB2\DB2\Database1.sdf");
try
{
conn.Open();
SqlCeCommand cmd = new SqlCeCommand(" update Kambariai set Kliento ID = Kliento ID + s Where Kliento ID = 0 ", conn);
cmd.ExecuteNonQuery();
toolStripStatusLabel1.Text = "Duomenys įrašyti";
conn.Close();
}
catch (Exception ee)
{
MessageBox.Show(ee.Message);
}
}
Datatable schema shows that column exists but I still get error that Column name invalid maybe I forgot to write something please help me :) What I am trying to do is take text from textbox1.Text and update it datatable values where coulmn name is Kliento ID and value is 0.