none
TableAdapterManager Object at run time RRS feed

  • Question

  • Hello experts.

    I was wondering about limitations of the TableAdapterManager Object.  What I love about this Object is the simplified Hierarchical updates.  Based on my understanding and use of the TableAdapterManager, instances are not possible for a "DataSet that is constructed in code". 

    To clarify and pose a question, if I build a DataSet and populate it with DataTables through run-time events, where no "DataBase" wraps the DataSet and DataTables (a disconnected DataSet), is it possible to instantiate a TableAdapterManager against the disconnected DataSet or is this a limitation of the TableAdapterManager?  I would use this to simply do DataTable Updates.

    It is such a useful and simple construct but I have not found a way to use it in the disconnected data scenario.  It seem as though this should be possible because all of the Data Objects and even relationships can exist without a DataAdapter connection.  Maybe the TableAdapterManager Object is dependent on a DataAdapter?  One piece of evidence for this may be that the TableAdapterManager is only created when a DataSource exists in the DataSources View and valid TableAdapter including Query strings exist.  I have been able to trick this out a bit using Excel but find it more trouble than reward unless a real Database sits under the connection...  Perhaps that is why it is not called the "TableManager" Object...

    Am I missing something here?...(I hope)

    Thank you in advance,

    Paul Barcomb


    Thursday, December 1, 2011 7:51 PM

Answers

  • Hi Paul,

    Welcome to MSDN Forum!

    From MSDN, it said that TableAdapterManager is created at design time as part of the dataset creation process. So, I’m afraid you can’t use it at run-time, if you want to update multiple tables, you can use sqlCommand. More information about TableAdapterManager, please refer here.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us
    • Marked as answer by Paul Barcomb Tuesday, December 6, 2011 3:32 AM
    Monday, December 5, 2011 6:35 AM
    Moderator

All replies

  • Hi Paul,

    Welcome to MSDN Forum!

    From MSDN, it said that TableAdapterManager is created at design time as part of the dataset creation process. So, I’m afraid you can’t use it at run-time, if you want to update multiple tables, you can use sqlCommand. More information about TableAdapterManager, please refer here.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us
    • Marked as answer by Paul Barcomb Tuesday, December 6, 2011 3:32 AM
    Monday, December 5, 2011 6:35 AM
    Moderator
  • Thank you for the response Allen.

     

    I suspected as much and already use various management techniques to track and update disconnected DataSets.  I was hoping that maybe someone had found a way to engage the feature without the use of adapters. 

     

    I think conceptually it would be a great feature to build, that is a Table Manager that works with disconnected (orphan) DataSets.  Think of it as an OpenSource Table Manager, call it a "TableManager", and give it all the power of the TableAdapterManager without the DataAdapter requirement.  Hook into the DataSet instead of the Adapter to manage relations.  This feature could service off-line or local data caches with Data Base level management via easy to use update Methods.  It could even be synchronized with a DataBase to make it more powerful.

    I might build one myself if I ever time...Ah well, we can dream right?

     

    Best Regards,

    Paul

     


    Paul F. Barcomb Principle Application Developer Belcan TechServices
    Tuesday, December 6, 2011 3:30 AM