-2
protected void ASPxButton1_Click(object sender, EventArgs e)
{ 
   try {
      string turusec = ASPxComboBox1.SelectedItem.ToString();

      switch (turusec)
      {
         case "Laptop":
            SqlDataSource1.InsertCommand = "INSERT INTO Laptops(L_marka_ismi,L_marka_modeli,L_marka_quantity, L_marka_fiyati,L_marka_discount, L_marka_description, )" +
                    "VALUES('" + ASPxTextBox1.Text + "','" + ASPxTextBox2.Text + "','" + ASPxTextBox3.Text + "','" + ASPxTextBox4.Text + "','" + ASPxTextBox5.Text + "','" + ASPxMemo1.Text + "'))";
          break;
4

1 回答 1

1

You have an extra ',' (comma) at the end of the fields list (before VALUES):

INSERT INTO Laptops(L_marka_ismi,L_marka_modeli,L_marka_quantity, 
L_marka_fiyati,L_marka_discount, L_marka_description**,**) VALUES...
于 2013-03-17T12:42:56.710 回答