in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Table Relations not usable when using dataset generator

Last post 11-18-2009 9:00 AM by msanders. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 11-18-2009 9:00 AM

    Table Relations not usable when using dataset generator

    Hi,

    We're currently using generated table adapters (using the dataset generator) to access our data (one adapter per table). Retrieving rows from a single table works fine, but when relations are used, we encounter serious problems.

     Example: Suppose we have a table 'Orders' and a table 'OrderRows' and add a relation between these tables. The generated table adapter for table 'Orders' enables us to get all Order rows. But when I want to retrieve relations via an Order object by calling Order.GetOrderRows(), it returns an empty collection (while the database shows that child rows do exist).

    If we do the same thing by first creating a OrderDatabaseDataSet (also generated code), then retrieve the OrdersTable and OrderRowsTable members and filling them with the corresponding generated adapters, it does work. But the generated methods on the adapter classes don't use this DataSet object, so this is no solution to our problem (especially since we add quite a lot of custom queries to the adapter objects to perform the queries we need).

    Since it's not possible that we're the first who are using System.Data.SQLite's dataset generator together with table relations, I was wondering if we were doing something fundamentally wrong (or have we encountered a bug in the dataset generator) ? Hope someone can help us with this issue...

     

    Regards,

    Martijn

    Filed under: ,
Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems