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

Define what is razor? : asp.net mvc

0 Answers  


Where do you store the information about the user?s locale?

2 Answers  


What describes a query?

0 Answers  


Explain how do you validate the controls in an asp .net page?

0 Answers  


what is clr .

1 Answers   Patni,






Which is better union or union all?

0 Answers  


How can we create custom controls in asp net?

0 Answers  


What is an asp.net web form?

0 Answers  


What is Web Application?

2 Answers   HCL,


Can we add code files of different languages in app_code folder?

0 Answers  


How to kill session?

18 Answers   Protech,


Where is ViewState information stored?

18 Answers   DSRC, HCL,


Categories