Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Smart Client Help Needed

Smart Client Help Needed

Scheduled Pinned Locked Moved ASP.NET
helpdatabasequestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 1884058
    wrote on last edited by
    #1

    Hello I have a web service which connects to a database and has to return a dataset to a normal windows application. I can connect to the database just fine and the web service stuff is okay for now, but my problem is how do i return the dataset from the web service to the windows application ALl help is highly appreciated Aenon

    J M 2 Replies Last reply
    0
    • U User 1884058

      Hello I have a web service which connects to a database and has to return a dataset to a normal windows application. I can connect to the database just fine and the web service stuff is okay for now, but my problem is how do i return the dataset from the web service to the windows application ALl help is highly appreciated Aenon

      J Offline
      J Offline
      Javier Lozano
      wrote on last edited by
      #2

      You can expose a method from the web service to 'external clients' by using the WebMethod attribute. For example if you want to return the DataSet back to your client you will do this:

      //C#
      [WebMethod]
      public DataSet GetData()
      {
      DataSet ds = new DataSet();

      return ds;
      }

      This will return the data back to the client to use. ~Javier Lozano

      1 Reply Last reply
      0
      • U User 1884058

        Hello I have a web service which connects to a database and has to return a dataset to a normal windows application. I can connect to the database just fine and the web service stuff is okay for now, but my problem is how do i return the dataset from the web service to the windows application ALl help is highly appreciated Aenon

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        Hi there, The DataSet class is serializable, so you can use it as the result of the Web method. You can take a quick look at the sample code below: Consuming a DataSet from an XML Web Service [^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups