How to send a datarow to a webservice in VB.NET

I have a datarow which contains all the web form data values and I want to submit to a webservice in VB.NET and in  VS 2005.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Datarow cannot be send directly.

What i do is make a dataset and add a table and then add row in it.

some thing like

dim ds as new DataSet
' ds.EnforceConstraints = false
ds.Tables.Add( rowToSend.Table.Clone())

then send ds


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This is the case when you have made webservice yourself.. and it has a method which takes dataset

Fernando SotoRetiredCommented:
Can you post the signature of the web method you are trying to use to send this data?
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

DataRow can't be sent to or received from a Web Service because the DataRow object isn't Serializable. Neither is the DataTable object for that matter.

The only way to do it is to pass a DataSet (which is Serializable) that contains a DataTable with DataRow objects in the DataTable.

The odd thing here is that the DataSet is made up of DataTable objects which are themselves made up of DataRow objects. When I first learned about this behavior, I thought it was wierd that MS designed the objects in this way. But, that's how it is.
vmandemAuthor Commented:
I really appreciate all your inputs. I will go ahead with the plan of creating datatable.
I will let you know how it goes, until then I will open up this question for more comments.

Thanks Again

vmandemAuthor Commented:
Every one gave good answer but would like to go with the first one.

Thanks All
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.