problem in insert image in sql with janus control use
-
hi i will insert info person to database and i use janus control and bind all input from databinding and bind picturebox and mathimage that is editbox and in run accure error: Update requires a valid UpdateCommand when passed DataRow collection with modified rows my code: save: try { bimehgozarBindingSource.EndEdit(); bimehgozarTableAdapter.Update(this.bimehDataSet.bimehgozar); } catch (Exception ex) { MessageBox.Show(ex.Message); } new: bimehgozarBindingSource.AddNew(); string query = "SELECT MAX(code_bg) FROM bimehgozar"; SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=bimeh;Integrated Security=True"); SqlCommand comSelect = new SqlCommand(query, con); con.Open(); string ID = comSelect.ExecuteScalar().ToString(); if (ID == "") editBox8.Text = 1.ToString(); else { int a = Convert.ToInt32(ID); a = a + 1; editBox8.Text = a.ToString(); } editBox1.Text = ""; editBox2.Text = ""; editBox3.Text = ""; editBox4.Text = ""; editBox5.Text = ""; editBox6.Text = ""; editBox7.Text = ""; editBox11.Text = ""; editBox12.Text = ""; editBox13.Text = ""; editBox14.Text = ""; pictureBox1.Image = null; i am accure errore in save Button click please help me i am tired. how save image when use janus control beacuse i use janus control not have value for insert. wheather i need to convert image to array. please guide me i want to insert info and long time accure error. best regards
-
hi i will insert info person to database and i use janus control and bind all input from databinding and bind picturebox and mathimage that is editbox and in run accure error: Update requires a valid UpdateCommand when passed DataRow collection with modified rows my code: save: try { bimehgozarBindingSource.EndEdit(); bimehgozarTableAdapter.Update(this.bimehDataSet.bimehgozar); } catch (Exception ex) { MessageBox.Show(ex.Message); } new: bimehgozarBindingSource.AddNew(); string query = "SELECT MAX(code_bg) FROM bimehgozar"; SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=bimeh;Integrated Security=True"); SqlCommand comSelect = new SqlCommand(query, con); con.Open(); string ID = comSelect.ExecuteScalar().ToString(); if (ID == "") editBox8.Text = 1.ToString(); else { int a = Convert.ToInt32(ID); a = a + 1; editBox8.Text = a.ToString(); } editBox1.Text = ""; editBox2.Text = ""; editBox3.Text = ""; editBox4.Text = ""; editBox5.Text = ""; editBox6.Text = ""; editBox7.Text = ""; editBox11.Text = ""; editBox12.Text = ""; editBox13.Text = ""; editBox14.Text = ""; pictureBox1.Image = null; i am accure errore in save Button click please help me i am tired. how save image when use janus control beacuse i use janus control not have value for insert. wheather i need to convert image to array. please guide me i want to insert info and long time accure error. best regards
If you have a problem with Janus control, perhaps you need to contact the support forums for the people who wrote it. They will be the best placed to answer questions like this.
-
If you have a problem with Janus control, perhaps you need to contact the support forums for the people who wrote it. They will be the best placed to answer questions like this.
thanks i put my question in many forum of programing but i just now my question in janus forum.