a windows application is to call a webservice which will call a stored procedure
-
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
-
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
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
-
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
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
-
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
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
-
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
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.