Execute a stored procedure in VB!

xiaoxiao2021-03-06  104

SUB CMD () DIM ICMD As Adodb.comManddim IRE &

Set ICMD = New Adodb.comMAndwith ICMD .activeConnection = ICONC 'Database Connection String .commandType = AdcmdStoredProc .commandtext = "Stored Procedure Name" .Parameters.Refresh' Create Stored Procedure Parameters.Parameters ("@ input parameter 1") = " Value 1 "'is assigned to the parameter. Parameters (" @ input parameter 2 ") =" Value 2 ".Execute' Execute Store DEBUG.PRINT .PARETERS (" @ output parameter 1 ") 'Display the execution of the stored procedure debug. Print .Parameters ("@ output parameter 2") End welhend Sub

转载请注明原文地址:https://www.9cbs.com/read-96699.html

New Post(0)