Vb-access connectivity problem
Hi,
here is some code:
Private Sub Command1_Click()
Data1.Refresh
Data1.Recordset.AddNew
Data1.Recordset.Update
End Sub
Private Sub Command2_Click()
On Error Resume Next
Data1.Recordset.Delete
Data1.Refresh
If Not Data1.Recordset.EOF Then
Data1.Recordset.MoveNext
ElseIf Not Data1.Recordset.BOF Then
Data1.Recordset.MovePrevious
Else
MsgBox "This was the last record in the table"
End If
End Sub
Private Sub Form_Load()
Data1.Refresh
End Sub
Using above code we can insert records and delete records. Where in back end there is a ms-access database. There are three fields in the database namely
Fieldname
Roll numeric primarykey
Name text
Age numeric
When all the records are deleted, we cannot insert any new record using command1 and there is some runtime error
3426 occurred. the error is "The action is cancelled by an associated property". How can I debug this?
-Saptarshi
|