Call Stored Proc from VB that will allow updating to tables
Posted on 2004-10-19
I get a runtime error 3251 Current Recordset does not support updating. This may be a limitation of the provider or of the selected locktype.
The following is the code I am using to call the stored proc.:
Dim rstProgram As ADODB.Recordset
Dim m_cmd As New ADODB.Command
Set rstProgram = New ADODB.Recordset
.ActiveConnection = conSQL
.CommandType = adCmdStoredProc
.CommandText = "sp_AllProgram" ' Stored Procedure name.
Set rstProgram = m_cmd.Execute
.AddNew 'HERE IS WHERE I GET THE ERROR
What am i doing wrong?