SQL Server Stored Procedure doesnt appear to be called -


the syntax of code in ms access appears correct.

i can run stored procedure manually in sql , correct result.

when try call stored procedure ms access using ado nothing appears happen; appreciated.

private sub combo13_lostfocus()  dim p1 integer  p1 = forms![frm_ws10a]![frm_ws10b]![combo13].column(0)  dim rs adodb.recordset dim cn adodb.connection dim cmd adodb.command dim prm adodb.parameter  dim adstring variant  set cn = new adodb.connection  cn.connectionstring = "driver=sql  server;server=ldxfbhd013492   \sqlexpress;database=xxxx;trusted_connection=yes;" cn.open  set cmd = new adodb.command cmd     .activeconnection = cn     .commandtext = "dbo.usp_update_consequenceweighting"     .commandtype = adcmdstoredproc     .parameters.refresh     set prm = .createparameter("@itid", adinteger, adparaminput)    prm.value = p1  end  set rs = cmd.execute  me.recalc me.refresh 

thanks in advance

you missing .parameters.append in code below

with cmd .activeconnection = cn .commandtext = "dbo.usp_update_consequenceweighting" .commandtype = adcmdstoredproc .parameters.refresh set prm = .createparameter("@itid", adinteger, adparaminput) 

try adding parameter.append instead of setting it

with cmd .activeconnection = cn .commandtext = "dbo.usp_update_consequenceweighting" .commandtype = adcmdstoredproc .parameter.append .createparameter("@itid", adinteger, adparaminput, 50, [value or variable here]) .execute 1 end 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -