dim my_usp as string
Dim rs As New ADODB.Recordset
Dim cmd As New ADODB.Command
Dim user As new ADODB.Parameter
my_usp = "您的存儲過程名"
With cmd
.ActiveConnection = currentproject.connection
.CommandText = my_usp
.CommandType = adCmdStoredProc
End With
set user = cmd.createparameter(,adbstr,adparainput)
cmd.parameters.append user
rs = comm.execute
'調用完後
set user = nothing
set cmd = nothing
set rs = nothing