CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    145

    How to change the MappingType of a column when using the DataSetDesigner?

    I am trying to use the DataSet Designer to create a DataSet for my application.
    In the Designer.cs file that was created by the designer, I see that the MappingType of all columns of the DataTables is MappingType.Element.
    How do I change the MappingType to be of type MappingType.Attribute?
    It is important to me, because later I want to save the DataSet into an Xml file, and I want the columns to be represented as attributes.
    Also, is it possible to define a column not to appear in the Xml file?

  2. #2
    Join Date
    Mar 2008
    Location
    IRAN
    Posts
    811

    Re: How to change the MappingType of a column when using the DataSetDesigner?

    the second part of your question is possible; you can use such this SQL query:

    Code:
    select col1, col2 from testtable
    and if you have for example col3 it will be ignored then you write to XML only select cols.

    But for the first part of your question i should say it is weird to me; for me XmlNode is applicable for columns and attributes for extra information about the node!

    Touraj Ebrahimi [toraj_e] [at] [yahoo] [dot] [com]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured