Here is how I am trying it. This method works for stored procedures I have created; the parameters collection holds a member for each parameter in the stored procedure.
oCmd = createobject("adodb.command")
with ocmd
.commandType = 4
.activeconnection = oConnection
.commandtext = 'sp_pkeys'
endwith
if (oCmd.parameters.count > 0)
oCmd.parameters("@table_name").value = 'customers'
endif
>
>What is the error message if any? I can run these without a problem. Make sure it's not a permissions problem, shouldn't be because most of these are available on the public role for the master database.
>
There is no error message, until I issue:
oRs = oCmd.execute
The error message at that point is that sp_pkeys is expecting a parameter @table_name...but I am unable to assign using the parameters collection because it is empty.
So, my original question was incorrect. The stored procedure is visible, I just can't seem to use the parameters collection in this case.
>There is a utility in the downloads "Get SP parameters collection" that should produce the necessary parameters collection for calling any sp. Just connect to the master database and the list of sp's gets populated.
I will check that out. Thanks...
Steve Gibson