Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename database fields in DataSet XML...

Status
Not open for further replies.

steverbs

Programmer
Jul 17, 2003
253
GB
Hi all.

So, is it possible to rename the fields in XML created from a DataSet. For example, I have a Table called Company and its fields are named using the convention F001, F002, F999, etc (Don't ask why, as it was outside of my control). I would like to give these fields more meaningful names in the XML, so that F001, would become CompanyRef, and so on.

Any ideas?

Stephen.
 
you could try this:

Code:
DataTable.Columns.Item("OldName").ColumnName = "NewName"

Untested though.

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Looks like it will do the trick.

Cheers.

Stephen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top