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

To load your generated dataset with data which method do you invoke?

0 Answers   Siebel,


What is a 1x1 pixel?

0 Answers  


what is the auto option in XML ?

1 Answers  


please can any describe 'Master Page' in ASP.Net 2.0

4 Answers  


What is a Windows Service and how does its life cycle differ from a standard EXE?

2 Answers  






can we edit records from repeater control

2 Answers  


can u debug application programatically? if yes how?

0 Answers   FactorH,


How many classes can a single .NET DLL contain?

6 Answers   SoftSol,


If we add a textbox and give the required field validator,and i add two radio buttons 1 is yes another one is No.And i add another one server control button ,if i click the button ,if the radio button Yes is checked the validation control is fired ,if no the validation control is not fired.So what you used to solve this problem.

6 Answers   CTS,


Suppose You Want A Certain Asp.net Function Executed On Mouseover For A Certain Button. Where Do You Add An Event Handler?

0 Answers   Siebel Systems,


Explain global assembly cache.

0 Answers  


What are the steps to follow to host a web application on a web server?

0 Answers   MCN Solutions,


Categories