[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ASP.Net  Bind a Web service to a variable

Posted on 2006-05-31
6
Medium Priority
?
224 Views
Last Modified: 2012-06-21
Hi,

I have a web service that I call in the following manner in my ASP.Net application.

    Dim ConsumeWebService As uk.co.education.www.EducationDirectRegistration
            ConsumeWebService = New uk.co.education.www.EducationDirectRegistration
         

This returns just one field, and I want to bind the field to a variable within my project.  I cannot find any examples on how to do this.  Any examples would be appreciated!?

I'm guessing it would be something along the following lines..

  VARIABLENAME.VALUE = ConsumeWebService.GetStatementAnswers(Username, Password, PAR1, PAR2)

thanks

0
Comment
Question by:kinton
  • 3
  • 2
5 Comments
 
LVL 2

Author Comment

by:kinton
ID: 16797418
It should be noted, the web service is returning the data as a dataset
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 16797880
Dim ConsumeWebService As New uk.co.education.www.EducationDirectRegistration
Dim ds As DataSet = ConsumeWebService.GetStatementAnswers(Username, Password, PAR1, PAR2)

Bob
0
 
LVL 2

Author Comment

by:kinton
ID: 16797915
ok, that seems to work, how can I pull the individual values out of that dataset?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16798633
Here is an example of one way:

Dim table As DataTable = ds.Tables(0)
Dim row As DataRow = table.Rows(0)
Dim name As String = row("Name").ToString()

It really depends on what you need as to how to best handle it.

Bob
0
 
LVL 2

Author Comment

by:kinton
ID: 16798689
That's perfect.   Thanks for the quick reply!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question