Hello
Anyone could you help i have got a strange problem when i update any record i get an error 2147467259 -(8000405) Insert Field failed. Where as on the same application i can add a new record. Please see below the code i have used dont know where am going wrong.
Private Sub cmdupdate_Click()
Set connection = New ADODB.connection
With connection
.ConnectionString = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;Port=3306;Database=apbooking;User=root;Password=root;Option=3;"
.Open
End With
Set rsupdate = New ADODB.Recordset
'Update New Actual weight and number of boxes
With rsupdate
If .State = adStateOpen Then .Close
.Open "select * from booking where hawb_no = '" & txthawb_no.Text & "'", connection, adOpenDynamic, adLockOptimistic
.Fields(15) = txtactno_box.Text
.Fields(16) = txtact_wt.Text
.Fields(20) = txttemp.Text
.Update
End With
MsgBox "Actual No of Boxes,Weight and Temperature Details Updated "
Unload Me
Me.Hide
End Sub