On Dec 2, 2011, at 4:07 AM, Jacek Kałucki wrote:

>> If it is possible 3 more questions:
>> - can you provide an example of that ? Or a link to an example because I 
>> did'nt fount one.
> 
> http://dabo.codepad.org/ZrebkNYe

        For a more detailed explanation with examples, see the wiki entry:

http://wiki.dabodev.com/DataSet

>> - it is posible do run against the dataset other sql commands like insert or 
>> delete (for example insert into dataset 1 (select * from dataset2) ?)
> 
> See link above.
> You can execute any query with "dataset" as source.
> Remember, there are no joins possible between different dDataSet objects in 
> queries,
> however you can join many dDataSet objects with '+' operator.

        That is not strictly true; assuming you have two datasets ds1 and ds2 
that represent cursors with the same structure, you could do:

aliasDict = {"otherDS": ds2}
sql = """select * from dataset
        union
        select * from otherDS
        order by somefield desc"""}
ds3 = ds1.execute(sql)

        This will create a third dataset that is the union of the first two. 
While this is equivalent to simply adding the two datasets as Jacek mentioned, 
it also allows you much more control over the columns that are returned and the 
ability to filter the results.

        Dabo's datasets are directly inspired from VFP's cursors. I wanted to 
ensure that anything you could do with a VFP cursor, such as local querying and 
filtering, you could do with a Dabo dataset.



-- Ed Leafe



_______________________________________________
Post Messages to: [email protected]
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/[email protected]

Reply via email to