Re: [dabo-users] multiple result sets. Is it possible?

Author: John Fabiani

Posted: 2012-03-02 at 16:49:16

On Friday, March 02, 2012 07:31:42 PM Ricardo Araoz wrote:

> El 02/03/12 19:09, Ed Leafe escribió:

> > On Mar 2, 2012, at 4:06 PM, Ricardo Araoz wrote:

> >> I need to send a user defined query to the dbms and recieve more than

> >> one result set. In fox I would send the query and recieve "cursor",

> >> "cursor1", ..., "cursorN".

> >> Is that possible?

> >>

> > I'm not sure I understand. Do you mean some sort of pagination of

> > results? It sounds like you want to send one query and receive

> > multiple result sets. That seems confusing to me.

> Let's say I have a really complex and time consuming set of queries that

> result in a temp table in the dbms. Now I want to get a couple of

> different views of this data, say I want a subset of this result table

> grouped and another subset in detail. So I obviously don't want to do

> these queries twice to get both data sets.

> I feel I'm not being clear. Bottom line, I want to send in one query two

> or more selects and recieve from the dbms two or more result sets.

I'm not sure what you mean and what I think I understand - I can't recall

doing anything like that in VFP.

But if I have the general idea right - I'll bring this up in hopes that it

will help.

Assume that I have executed a large SQL statement. Now I need to create

several sub-queries based on the data I retrieved. You can do this in several

ways. You could filter it - similar to what VFP did. You could execute SQL

statement against the retrieved data.

something like:

myDataSet = bizobj.getDataSet()

newDataSet1 = myDataSet.execute("Select somefields from dataset where pkid =

someValue")

newDataSet2 = myDataSet.execute("Select somefields from dataset where pkid =

someOtherValue")

Therefore, only one query was made on the database ( a really complex and time

consuming query) and the rest was made from the retrieved data.

Now you have two different datasets plus you still have the first one.

Johnf

_______________________________________________

Post Messages to: Dabo-users@leafe.com

Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Searchable Archives: http://leafe.com/archives/search/dabo-users

This message: http://leafe.com/archives/byMID/3027799.WDcYKG2Dqm@linux-12

©2012 John Fabiani