Hi,
i have a Stored Procedure (Query) in Access 2000 and I am trying to find out how many parameters it requires.
For SQL Server I've always used this:
For some reason, when I do Parameters.Refresh it always has a count of 0, yet when I execute the command, VB keeps raising an error saying that it requires 3 parameters. (which I know to be true).Code:CN.CursorLocation = adUseClient CMD.CommandType = adCmdStoredProc CMD.ActiveConnection = CN CMD.CommandText = SPName ' returns parameter type from sp CMD.Parameters.Refresh ' Param 0 is RETURN_VALUE For I = 1 To CMD.Parameters.Count - 1 Set Param = CMD.Parameters(I) DebugString = DebugString & Param.Name & " " & Param.Type & vbCrLf Param.Value = Args(I - 1) 'Args is passed in through sub Next 'Run Stored procedure Set RunStoredProc = CMD.Execute
So how can I get the number of parameters required by my stored procedure?
Thanks
Totally





Reply With Quote