Click to See Complete Forum and Search --> : DataSet - returned row names


Paul Tracey
June 11th, 2003, 11:16 AM
I have a problem, when populating my DataSet, then using the .GetXML() method, each row is named <Table>. This is a single table query (i.e. Select * From EmailAddress). I would like to be in control of this name so it was more meaningful.

Example :

(RECS)
(Table)
(ContactDetailID)44(/ContactDetailID)
(Address)john.smith@myprovider.co.uk(/Address)
(/Table)
(Table)
(ContactDetailID)45(/ContactDetailID)
(Address)j.smith@yahoo.com(/Address)
(/Table)
(/RECS)

Any ideas ?
Note, for the purposes of this post, I have placed the tags inside brackets, otherwise the Table element was interpreted as HTML :confused:

riscoh
August 4th, 2003, 08:55 AM
you can use aliases on your sql statement or..........



add constraints..................

DataSet1.Tables(0).Columns(1).ColumnName = "Sample"