hello guys
can u help me with code. Everytime i run the program and update the data in database. I got the error in this code
da.Update(ds, "reservationdata")
Dim dt As DataTable = ds.Tables("reservationdata")
If resno.Text = "" Or custname.Text = "" Or custaddress.Text = "" Or TextBox1.Text = "" Or endTime.Text = "" Or amouttopaid.Text = "" Or InitialDeposite.Text = "" Or RemainingPayment.Text = "" Or DateTimePicker1.Text = "" Then
MsgBox("Please fill the amount information for update", MsgBoxStyle.Exclamation, "UPDATE PAYMENT INFORMATION")
Else
Try
With dt
.Rows(0)("resno") = resno.Text
.Rows(0)("custname") = custname.Text
.Rows(0)("custaddress") = custaddress.Text
.Rows(0)("facname") = facname.Text
.Rows(0)("amenityname") = amenityname.Text
.Rows(0)("startTime") = TextBox1.Text
.Rows(0)("endTime") = endTime.Text
.Rows(0)("amounttopaid") = amouttopaid.Text
.Rows(0)("InitialDeposite") = InitialDeposite.Text
.Rows(0)("RemainingPayment") = RemainingPayment.Text
.Rows(0)("datereservation") = DateTimePicker1.Text
MsgBox("Record successfully updated.", MsgBoxStyle.Information)
resno.Text = ""
custname.Text = ""
custaddress.Text = ""
facname.Text = " Select Facility"
amenityname.Text = " Select Amenity"
endTime.Text = ""
InitialDeposite.Text = ""
RemainingPayment.Text = "'"
amouttopaid.Text = "0"
End With
Catch ex As MySqlException
MsgBox(ex.ToString)
End Try
da.Update(ds, "reservationdata")
End If