Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. problem in insert image in sql with janus control use

problem in insert image in sql with janus control use

Scheduled Pinned Locked Moved C#
databasehelpdata-structuressecuritytutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fatemehsoleimani
    wrote on last edited by
    #1

    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

    P 1 Reply Last reply
    0
    • F fatemehsoleimani

      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

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      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.

      F 1 Reply Last reply
      0
      • P Pete OHanlon

        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.

        F Offline
        F Offline
        fatemehsoleimani
        wrote on last edited by
        #3

        thanks i put my question in many forum of programing but i just now my question in janus forum.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups