Binding to a DataSet Returned by a Web Service

K

kelly.harrison

I've got a web service that I'd like to use to load, update, delete,
etc... data from a typed dataset. The dataset is being consumed by a
windows forms app. The web method looks like this:

[WebMethod]
public void Load(ref UsersDS ds)
{
// load the dataset in the usual way...
}

When the dataset is returned, I can confirm that it does indeed have
the data loaded from the web service. However, when it is returned,
nothing shows up in the controls bound to the dataset unless I rebind
them:

this.textBox1.DataBindings.Clear();
this.textBox1.DataBindings.Add("Text", this.usersDS1,
"Users.UserName");

I understand that there's no true pass by reference going on here,
despite the 'ref' prefix in the web method's parameter list. However,
shouldn't this work?

Thanks,

Kelly
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top