Click here to Skip to main content
15,911,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having a query which can be done by both sp and function, so Should i have to use function or sp. which one is better and why??
Posted

It depends on your requirements.

Try running the query in string format from your page instead of calling a stored procedure, you might see a performance gain and you will have a better deployment model which will be more robust (no need to update both your asp.net and database at the same time).
 
Share this answer
 
I cant I am having a structure defined in the project either i can use function for that or sp. so, i jst wnt to know is function better then sp for this purpose.
 
Share this answer
 
Just Googling[^], you may find many many results.
 
Share this answer
 
If you consider the security Issue I think Store procedure is better
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900