Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP returns 2 results sets, how do I retrieve them in VFP
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00754718
Message ID:
00754722
Views:
31
This message has been marked as a message which has helped to the initial question of the thread.
>I have written an SQL Stored Procedure that creates two result sets and I need them both in VFP. This is not the same as sending two select commands from VFP as shown in VFP help. I can't union the results because they have completely different structures and I need to keep those structures intact when I pull the data to VFP. They must be created together because the second set uses key values from the first set to retrieve additional data. Is there any way to retrieve both the cursors in VFP? At this time I get neither cursor and the data session window is empty.
>
>
>lcCommand = "exec ap_ShippingDetailForDateRange '1000', '2000'"
>
>=SQLSetProp(lnConnect, "BatchMode", .F.)
>
>lnResult = sqlexec(lnConnect, lcCommand, 'curOpen')

you can return multiple result sets from a sp...

try this;
CREATE PROCEDURE w_test AS

select "wayne" as ctext1
select "wayne" as ctext2
GO

then call it from VFP - you get two result sets
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform