If you are comfortable with the System.CodeDom namespace, its pretty
straightforward to write your own version of the MSDataSetGenerator custom
tool.  All you need to do is call
System.Data.TypedDataSetGenerator.Generate(), and then walk the generated
CodeDom tree making adjustments where necessary.  I've done this in order
to make the typed column properties of a dataset public instead of
internal.  I dont think it would be too hard to add a new method:
public string GetFriendlyName( DataColumn )
to the generated data table code, or perhaps a series of properties
(Column1FriendlyName, Column2FriendlyName, etc...)

-John

On Fri, 26 Mar 2004 15:13:24 +0100, Zecharya, Bar (FIRM)
<[EMAIL PROTECTED]> wrote:

>Does anyone have an idea how I could add extra column information, like a
>second "name" property, to a typed dataset?
>
>I'm working on a mechanism to log changes made to a dataset, by looping
>through each table, calling GetChanges(), and then looping through each
>column and logging when a change has been made to that column's data.
>However, I would like to provide a more user-friendly name for the columns
>(a string would suffice).
>
>Given a column description like:
><xs:element name="id_customer" type="xs:int" />
>
>I would like to change it to (for example)
><xs:element name="id_customer" friendlyname="The customer's unique
>identification number" type="xs:int" />
>
>But I get a compiler error: "The 'friendlyname' attribute is not supported
>in this context."
>
>Any ideas (both localizable and non-localizable welcome)?
>
>Bar
>
>
>Bar Zecharya
>Marine Resources Division (FIRM)
>Fishery Department
>Food and Agriculture Organization of the United Nations
>Viale delle Terme di Caracalla 00100 Rome Italy
>
>===================================
>This list is hosted by DevelopMentorŪ  http://www.develop.com
>Some .NET courses you may be interested in:
>
>NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
>http://www.develop.com/courses/gaspdotnetls
>
>View archives and manage your subscription(s) at
http://discuss.develop.com

If you are comfortable with the System.CodeDom namespace, i

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to