Why r u using ADODC1 instead of ADODB?
From the information you have given, it seems to me that you would have to open the recordset before you do a delete method. Now regarding the dbgrid, you might need to pass the parameter(highlighted column) to the recordset before you can delete it, here's some sample code (you are going to need to adjust it to your needs):
Code:
Dim response As Integer
Dim BYTER As Integer
Dim rs As ADODB.Recordset
Dim cm As ADODB.Command
Dim p As ADODB.Parameter
BYTER = DbGrid1.RowSel
Set rs = New ADODB.Recordset
Set cm = New ADODB.Command
Set cm.ActiveConnection = cn
cm.CommandType = adCmdStoredProc
cm.CommandText = "sp_get_all_data_from_tblReport"
Set p = cm.CreateParameter("@RepId", adInteger, adParamInput, Len(DbGrid1.TextMatrix(BYTER, 2)), DbGrid1.TextMatrix(BYTER, 2))
cm.Parameters.Append p
Set rs = cm.Execute
With rs
.delete
.UpdateBatch adAffectAllChapters
End With
End Sub
I hope this helps. Good Luck!