using data tables to create XML - need to have a column be a complex type

  • Thread starter Brett Wesoloski
  • Start date
B

Brett Wesoloski

So I created my dataset class. Then added my datatables and the columns to
the data tables.

What I want to do is when I fill the datatable have one of the columns be
another datatable so that I can create my complex type when I get the XML.


So lets say I have two tables Stop_Location and Stop_Address

Table Stop_Location
Column Stop_Name
Column Stop_City
Column Stop_Address


Table Stop_Address
Column Stop_Address1
Column Stop_Address2

Then when I fill table Stop_Location I would like Stop_Address to actually
be the columns from table Stop_Address.

I tried to make Stop_Address a datatype of object then when adding my row to
Stop_Location I tried to add a row for the stop_Address column as the
Stop_Address table.

But that gives me an error of "does not implement IXmlSerializable interface
therefore can not proceed with serialization."

Any help would be appreciated.

TIA,
Brett
 
G

Gregory A. Beamer

So I created my dataset class. Then added my datatables and the
columns to the data tables.

What I want to do is when I fill the datatable have one of the columns
be another datatable so that I can create my complex type when I get
the XML.

I am confused, as there is not enough information here.

Is the complex type a mixture of the two datatables? Or is the one
contained in another one.

Are you having issue because you are serving this as XML or trying to
send it through a service as XML, or what?

In addition, it is best to post at least a bit of code around the error
along with enough of the error to get a good idea what is happening
(full stack works).

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top