I am trying to save some data in a table, but I keep getting this error:
"Run-time error '3251': Object provider is not capable of performing requested operation"

VB debug stops at the line that says "rs.AddNew"

Is there something I need to add at the code below that would solve this problem? Thanks a lot. Also, I need to find out how to delete a recordset.

######################### CODE ###########################
Private Sub SaveData() 'this procedure saves the data.
Dim response As Integer
Dim rs As ADODB.Recordset
Dim cm As ADODB.Command
Dim p As ADODB.Parameter

Set cm = New ADODB.Command
Set cm.ActiveConnection = cn
Set rs = New ADODB.Recordset
rs.LockType = adLockOptimistic
rs.CursorType = adOpenKeyset
cm.CommandType = adCmdStoredProc
cm.CommandText = "sp_get_atm_info"
Set p = cm.CreateParameter("@AtmId", adChar, _ adParamInput, 10, cbAtmId.Text)
cm.Parameters.Append p
Set rs = cm.Execute

If rs.EOF Then
response = MsgBox("adding new", vbOKOnly)
rs.AddNew
End If

With rs
.Fields("AtmId") = cbAtmId.Text
.Fields("Name") = txtCompany.Text
.Fields("Address") = txtAddress.Text
End With

rs.Update
rs.Close
Set rs = Nothing
End Sub