How can you execute stored procedure from windows application?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we apply themes to an asp.net application?

558


We Only Know The Total Number Of Feet In The Farmyard. Write A Program that will compute the total number of rabbits and chickens in the farmyard. Assume number of feet in the farmyard are 40. how many rabbits and chickens are?

433


Give 2 examples for scenarios when routing is not applied?

596


Explain the benefits of viewstate?

578


How to create discussion forum in asp.net mvc? : Asp.Net MVC

531






Explain the difference between asp.net mvc and asp.net webforms

572


What is http session state?

519


What is state management techniques in asp.net?

526


How is my content secured from unauthorized access?

515


How to implement Authentication and Authorization?

562


What is the advantage of mvc over asp.net? : Asp.Net MVC

498


What is the difference between typeof() vs gettype()?

549


Please brief not about xsd,xslt & xml?

542


Define static function?

568


What is recordset asp?

539