Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO Command & stored procedures
Message
From
22/06/2001 17:35:36
 
 
To
22/06/2001 17:12:13
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00522595
Message ID:
00522676
Views:
9
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)  && this should not be zero, but it is...
    oCmd.parameters("@table_name").value = 'customers' && this line crashes if called
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform