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
  1. Home
  2. General Programming
  3. C#
  4. a windows application is to call a webservice which will call a stored procedure

a windows application is to call a webservice which will call a stored procedure

Scheduled Pinned Locked Moved C#
databasehelp
5 Posts 4 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.
  • K Offline
    K Offline
    Krishna Aditya
    wrote on last edited by
    #1

    Hi, Is it possible to develop " a windows application to call a webservice which will inturn call a stored procedure ". If, so please help me in doing this. thanks for the help Krishna

    M 1 Reply Last reply
    0
    • K Krishna Aditya

      Hi, Is it possible to develop " a windows application to call a webservice which will inturn call a stored procedure ". If, so please help me in doing this. thanks for the help Krishna

      M Offline
      M Offline
      Mbah Dhaim
      wrote on last edited by
      #2

      yes it is. 1. create a web service application 2. in a method from your web service call your stored procedure using System.Data.DbCommand inheritance (i.e SqlCommand for SqlServer) by set it's CommandText property with name of your stored procedure, CommandType = CommandType.StoredProcedure and create it's related parameters (see SqlParameter class as sample) 3. Create a windows application (windows form or console) 4. Add Web reference from your web service address to your windows application, usually it will create a class refer to your web service object 5. call the method in step 2 from created web service class in your windows application hope it helps

      dhaim ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro" in the front line gave a lead, in the middle line build goodwill, in the behind give power support

      K 1 Reply Last reply
      0
      • M Mbah Dhaim

        yes it is. 1. create a web service application 2. in a method from your web service call your stored procedure using System.Data.DbCommand inheritance (i.e SqlCommand for SqlServer) by set it's CommandText property with name of your stored procedure, CommandType = CommandType.StoredProcedure and create it's related parameters (see SqlParameter class as sample) 3. Create a windows application (windows form or console) 4. Add Web reference from your web service address to your windows application, usually it will create a class refer to your web service object 5. call the method in step 2 from created web service class in your windows application hope it helps

        dhaim ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro" in the front line gave a lead, in the middle line build goodwill, in the behind give power support

        K Offline
        K Offline
        Krishna Aditya
        wrote on last edited by
        #3

        Hi Dhaim, Thanks for the reply.. Can you please elaborate point 2 in your reply. public class Service1 : System.Web.Services.WebService { [WebMethod] // Is calling SP should happen here?? // my SP is generic_SP written in Sql server 2005 please provide a low level implementation as I am newbie in this field and to finish of this work urgently. Sorry for the pressure. please help. Thank you, Aditya

        M L 2 Replies Last reply
        0
        • K Krishna Aditya

          Hi Dhaim, Thanks for the reply.. Can you please elaborate point 2 in your reply. public class Service1 : System.Web.Services.WebService { [WebMethod] // Is calling SP should happen here?? // my SP is generic_SP written in Sql server 2005 please provide a low level implementation as I am newbie in this field and to finish of this work urgently. Sorry for the pressure. please help. Thank you, Aditya

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          Krishna Aditya wrote:

          Sorry for the pressure.

          What makes you think there is any pressure on Dhiam, he is doing you a favour by trying to help you. No pressure on him!. This is pretty straight forward design and construct for a developer, why is there pressure on you to perform this if you are a newbie. Asking someone for a "low level implementation" is the same as asking for the codz, greatly frowned upon in these forums. You need to do the work yourself, including the research into how to build a web service.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          • K Krishna Aditya

            Hi Dhaim, Thanks for the reply.. Can you please elaborate point 2 in your reply. public class Service1 : System.Web.Services.WebService { [WebMethod] // Is calling SP should happen here?? // my SP is generic_SP written in Sql server 2005 please provide a low level implementation as I am newbie in this field and to finish of this work urgently. Sorry for the pressure. please help. Thank you, Aditya

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Krishna Aditya wrote:

            I am newbie in this field and to finish of this work urgently. Sorry for the pressure.

            If it's urgent, pay to get it done. Try rentacoder[^] or work at it and figure it out. The pressure is only on you, no one here will code for you.

            Check out the CodeProject forum Guidelines[^]

            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