Azhar Azhar - 5 months ago 31
SQL Question

Query vs Stored procedure; difference between two approaches

I am developing a web page for search. I have two options to build this page

  1. To build the query on page according to parameter enter by the user and send it to server.

  2. To send parameters to stored procedure and build query there and get it executed.

I want to know that which approach I should adopt and why.

I want to know the advantages or disadvantages of both approaches.


You can take idea from following links:

Ad hoc queries vs stored procedures vs Dynamic SQL