I use ADO to access SQL table as database and I have problem when objRS.delete is access. This command is to remove all record in the table.
"Error run time 214746259(80004005)
Key column information is insufficent or incorrect.Too many row were infected by update"
when use in Access table is run smootly.I dont know what's up here. If any ever experiences and know exactly what's up here can give comment is greatly appreciated.thanks in advance
Best RegardsVB Code:
Dim objConnection As ADODB.Connection Dim objRS As ADODB.Recordset Private Sub Command3_Click() If objRS.RecordCount = 0 Then MsgBox "OUW. NO RECORD!" Exit Sub Else objRS.MoveFirst Do While Not objRS.EOF objRS.MoveFirst [B]objRS.Delete[/B] objRS.Update objRS.MoveNext Loop MsgBox "Finish,Hm" End If End Sub
Kamus




Reply With Quote