none
iam want help about it :( RRS feed

  • Question

  • Try to add data to the database,Show this error,   Number of query values and destination fields are not the same. plase iam want help to fixed it

    Dimcmd AsNewOleDbCommand("insert into Salary (id_Employee,Salary,Date_of_Salary_Exchange,Bonuses,Incentives) values('"& TextBox2.Text & "','"& TextBox3.Text & "',#"& DateTimePicker1.Value.ToString("yyyy/MM/dd") & "#),'"& TextBox4.Text & "','"& TextBox5.Text & "' ")

    cmd.Connection = con

            con.Open()

            cmd.ExecuteNonQuery()

            con.Close()

            LOadDataTODGV()

           

    MessageBox.Show("xxxx ")

            TextBox1.Text =

    String.Empty

            TextBox2.Text =

    String.Empty

            TextBox3.Text =

    String.Empty

            TextBox4.Text =

    String.Empty

            TextBox5.Text =

    String.Empty

    Friday, March 18, 2016 12:08 PM

Answers