-
Hello,
I was wondering if anyone could tell me why my stored procedure that has updates to a table is not updating. My code looks like this:
Dim rs As New ADODB.Recordset
Dim conn As New ADODB.connection
Dim cn As New ADODB.Command
frmMaster.MousePointer = vbHourglass
conn.Open "Provider=SQLOLEDB.1;Password=opsmill;Persist Security Info=True;User ID=millops;Initial Catalog=accum_orders;Data Source=CLQ_MILL_REPLIX"
Set cn.ActiveConnection = conn
cn.CommandType = adCmdStoredProc
cn.CommandText = "accum_net_prod"
cn.CommandTimeout = 900
cn.Execute(adAffectAll)
frmMaster.MousePointer = vbDefault
conn.Close
MsgBox ("Running the procedure is complete")
It runs without any errors but the tables are not being update. I appreciate any help given. Thanks
-
Hi,
Does your stored procedure work from the database itself? If you are not getting any errors then either your stored procedure is wrong or your user does not have the permission to do what you are asking it to do.
HTH,
Preeti