Adding an Object of name value pairs to a dataset?

  • Thread starter Thread starter Isz
  • Start date Start date
I

Isz

Dear group:

I am inexperienced in more advanced csharp techniques such as
interfaces/interfaces/collections etc. But here is what I would like to
do:

I have an object in MM Flash that contains several name-value pairs of
different type. Something like this...

var recData = [{id:0, firstName:"Mick", lastName:"Jones"},
{id:1, firstName:"Joe", lastName:"Strummer"},
{id:2, firstName:"Paul", lastName:"Simonon"}];

I pass this object to a CSharp.Net class using Flash Remoting, but I want
to turn it into a DataSet so I can update a database. I figure I can pass
this object into a method as an object argument, but from there I am at a
loss.

Some ideas I have had would be to add the object to a collection like the
NameValueCollection or the NameObjectCollection but I am not sure how to do
that. Any help grately appreciated.


Isz
 
Isz,

I think that your best bet would be to use a data set. I would
recommend creating a data table with three columns, one for the id, one for
the first name, and one for the last name. Then, you can just add the
values as they come in.

Hope this helps.
 
Back
Top