Hi friends,
I want to create a dynamic stored procedure. Whether i should create it in the databse or can i create in in my dataaccess layer, i need your guidance please
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jean PaulRank #32 · 38.5K reputationPosted Nov 8, 2011, 5:50 PM EST
If we do this in the database, then the database version should be updated.
(After all as it is dynamic stored procedure with more chances to be changed, needs flexibility in changing - placing in application db layer is better)
After all, this is my first thoughts..
Nethra R SRank #6,347 · 269 reputationPosted Nov 8, 2011, 6:40 PM EST
Thanks, I will create the dynamic stored procedure in dataaccess layer
Jean PaulRank #32 · 38.5K reputationPosted Nov 8, 2011, 8:34 PM EST
Can I request you to mark the post as answer if your query resolved.
Nethra R SRank #6,347 · 269 reputationPosted Nov 9, 2011, 5:47 PM EST
Jean PaulRank #32 · 38.5K reputationPosted Nov 9, 2011, 6:18 PM EST
My idea is to have the following steps:
1) Modify the Stored Procedure if it already exists.
2) Create the Stored Procedure if not exists
We can use IF EXISTS, CREATE PROC statements for that.
Please refer the following:
http://msdn.microsoft.com/en-us/magazine/cc188749.aspx