Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO and SQL stored procedures
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00560234
Message ID:
00560253
Views:
17
James,
Try declaring an additional parameter as an OUTPUT parameter, ie:

CREATE PROC sp_getkey @tablename varchar(50), @returnkey integer OUTPUT AS.....

Set the @returnkey parameter in your stored procedure and check it AFTER calling the execute method to see what value was returned.

.Execute()
lnReturnKey = .Parameters('@returnkey').Value

Typically, creating a recordset that only contains one value is a lot of overhead and should be avoided if you can return a parameter instead.

Hope this helps.
Kurt
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform