none
DataTableMerge with Mappings RRS feed

  • Question

  •  

    Is it possible to merge a DataTable with another DataTable using DataTableMappings?

     

    It looks like from documentation that DataTableMappings collection can only be used with a DataAdaptor - any ideas folks?

    Friday, July 25, 2008 1:04 AM

Answers

  • Hi Paul,

     

    Thanks for your help here. I didn't want to corrupt my original datatable's column names to match up with my new app that used this data.

     

    In the end I used the merge function but altered the reporting data layer (the new use for this data) to match the original api. being able to specify mappings would have been great but not completely necessary.

     

    Cheers

    Monday, July 28, 2008 1:17 AM

All replies

  • What is it that you are actually trying to do? Merge two sets of data with differing schema or column names?

    Friday, July 25, 2008 4:41 AM
  • different column names. i'd prefer to not have to iterate through, I'd like to use a similar syntax as data adaptor with a mappings collection specified.

     

    I have 2 datasets from two different applications, it doesn't make sense to change the schema of one for the other as it would 'warp' the meaning of each application's data (+plus refactoring) so specifying a mapping would be sweet.

     

    Is it supported - perhaps a mappings collection paired with an implementation of IDataAdaptor that supports reading from dataTables??

     

    Friday, July 25, 2008 6:07 AM
  • Assuming you're populating the DataTable from a data source can you alias the column names to match those in the other table when you perform the SELECT?

    Friday, July 25, 2008 2:59 PM
  • Hi Paul,

     

    Thanks for your help here. I didn't want to corrupt my original datatable's column names to match up with my new app that used this data.

     

    In the end I used the merge function but altered the reporting data layer (the new use for this data) to match the original api. being able to specify mappings would have been great but not completely necessary.

     

    Cheers

    Monday, July 28, 2008 1:17 AM