Моя база данных не может обновиться
Почему-то, когда я обновляю базу данных, она ничего не меняет.
Что я уже пробовал:
Private Sub btn_updatecustomer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_updatecustomer.Click Try run_sql_command("UPDATE TBL_CUSTOMER_A155751 SET FLD_CUSTOMER_ID = '" & txt_customerid.Text & "' WHERE FLD_CUSTOMER_ID='" & current_code & "'") run_sql_command("UPDATE TBL_CUSTOMER_A155751 SET FLD_CUSTOMER_NAME = '" & txt_customername.Text & "' WHERE FLD_CUSTOMER_NAME='" & current_code & "'") run_sql_command("UPDATE TBL_CUSTOMER_A155751 SET FLD_CUSTOMER_CONTACT = '" & txt_contactnum.Text & "' WHERE FLD_CUSTOMER_CONTACT ='" & current_code & "'") run_sql_command("UPDATE TBL_CUSTOMER_A155751 SET FLD_CUSTOMER_ADDRESS = '" & txt_customeraddress.Text & "' WHERE FLD_CUSTOMER_ADDRESS ='" & current_code & "'") run_sql_command("UPDATE TBL_CUSTOMER_A155751 SET FLD_CUSTOMER_EMAIL = '" & txt_customeremail.Text & "' WHERE FLD_CUSTOMER_EMAIL='" & current_code & "'") Beep() MsgBox("You have succesfully updated the customer """ & current_code & """.") refresh_grid() clear_fields() get_current_code() Catch ex As Exception End Try End Sub
[no name]
Потому что вы просите атаку SQL-инъекции и игнорируете любые ошибки, которые генерирует ваш код.