How can you execute stored procedure from windows application?



How can you execute stored procedure from windows application?..

Answer / jigneshsanghvi


Stored proc. can be executed using command object by
ExecuteNonQuery method.

Sample Code :
Dim cnn as new sqlconnection
cnn.connectionstring=constr
cnn.open()

Dim cmd as new sqlcommand
cmd.connection=cnn
cmd.commandtext = "ProcName" & parameter list separated by comma
cmd.ExecuteNonQuery()

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

How will you do windows authentication and what is the namespace? If a user is logged under integrated windows authentication mode, but he is still not able to logon, what might be the possible cause for this? In ASP.Net application how do you find the name of the logged in person under windows authentication?

0 Answers  


Can we set master page as a start page?

0 Answers  


You are planning the deployment of an ASP.NET application. The application uses a Visual Studio .NET component named DataAccess that will be shared with other applications on your Web server. You are using Visual Studio .NET to create a Windows Installer package. You need to deploy DataAccess and the ASP.NET application so that they can be uninstalled later of necessary. What should you do? A . Create a setup project for DataAccess. Add the ASP.NET application in a custom action. B . Create a setup project for the ASP.NET application. Create another setup project for DataAccess. C . Create a Web setup project for the ASP.NET application. Add a project output for DataAccess. D . Create a Web setup project for the ASP.NET application. Add a merge module for DataAccess.

3 Answers   Syntax Softtech,


What is versioning in .NET?

1 Answers   Syntax Softtech, Wipro,


What New Features comes with ASP.NET Web API 2.0?

0 Answers  


Which method do you use to kill explicitly a users session?

0 Answers   MindCracker,


List the events in page life cycle.

0 Answers  


Which control has default post back is enabled(true)?

0 Answers   Sans Pareil IT Services,


What is a session government?

0 Answers  


what is code access security,role based security explain with example

1 Answers   Infosys,


What type of code, client-side or server-side, is found in a code-behind file of a Web page?

0 Answers   MindCracker,


Will the asp.net validators run in server side or client side?

0 Answers  


Categories