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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jean PaulPosted Nov 8, 2011, 10:50 PM
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..
Jean PaulPosted Nov 9, 2011, 11:18 PM
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
Nethra R SPosted Nov 9, 2011, 10:47 PM
Jean PaulPosted Nov 9, 2011, 1:34 AM
Can I request you to mark the post as answer if your query resolved.
Nethra R SPosted Nov 8, 2011, 11:40 PM
Thanks, I will create the dynamic stored procedure in dataaccess layer