DataSet Question

Posted on 2009-02-16
Last Modified: 2013-11-05
I would like to return a dataset with a couple data-tables out of a webservice and then use it in a client application. How would I return the structure out of the webservice and then consume it in the client windows app?
Question by:thenrich
    LVL 74

    Accepted Solution

    You would need to create a function on the web service that returned a DataTable/DataSet. Your client application would have a reference to your web service and thus it would know that the function is returning a DataTable/DataSet and you would capture it as a return value from the function and use it as you would any other code. My syntax might be off a little as I started wrting this in C# ;)
    // Your webservice
    <OperationContract()> _
    Function GetData(string parameter) As System.Data.DataTable
    // Your client
    Dim webVar As new WebServiceName
    Dim dt As System.Data.DataTable
    dt = webVar.GetData("some parameter value")

    Open in new window

    LVL 5

    Author Closing Comment

    I was missing setting my funaction on the web service as a dataset

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    I'm currently working for a company where I have to upgrade over 50 VB6 programs to VB.NET 2008.  So far I'm about half way through, and I've learned quite a few tricks that drastically improve the performance of VB.NET apps. Because there are a…
    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now