private void button1_Click(object sender, EventArgs e) { /*VirtualPet.Popup popup = new VirtualPet.Popup(); popup.UpdatePopup();*/ SqlCeConnection conn = new SqlCeConnection("Data Source=E:\\Project Final_Year\\Project Final\\MyProject\\ERU Implementation\\VirtualPetedit\\VirtualPet\\MyDB.sdf"); string query = "UPDATE Events SET (event_name='" + this.textBox2.Text + "', event_description='" + this.richTextBox1.Text + "', event_type='" + this.comboBox1.SelectedItem + "', date='" + this.dateTimePicker1.Value + "', time='" + this.textBox3.Text +"') WHERE event_id = " + textBox1.Text + ";"; SqlCeCommand cmd = new SqlCeCommand(query, conn); try { conn.Open(); SqlCeCommand command = new SqlCeCommand(query, conn); command.ExecuteNonQuery(); VirtualPet.Popup popup = new VirtualPet.Popup(); popup.UpdatePopup(); conn.Close(); //command.Parameters.AddWithValue("@EI", textBox4.Text); } catch (Exception err) { MessageBox.Show(err.Message); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)