Frenz,
In my Asp.net ERP application, i have build the entire business logic inside the stored procedure.. i personally felt it is much better way for me.. i have found too many advantages in it.. even after deploying the application also, if i need to change in the
business logic, i have modified only in SP.. so that i dont need to redeploy app..
but, i have come across the following articles.. and now i want to discuss with u guys to use SP or not to use SP.. or is it depends on the project???
http://www.developerfusion.co.uk/scripts/print.aspx?id=4708
http://weblogs.asp.net/rhoward/archive/2003/11/17/38095.aspx
so, throw some ideas here..
-
-
Well, personally, I don't use SPs, except when I really need the little bit of extra perfomance it gives me.
The main reason for my decision is that it's harder to port the application to another DB. For instance, I was writing a program for windows, and had used Access as the DB. It seemed enough at the time. The functionality of this app then "exploded" and I had to use another DB. I chose MySql. The port was done in 15 min or so. Then, after evaluating some other options (mysql isn't free for all purposes), I decided to go with PostgreSql. And that took me another 15 min.
But, that's just me
Regards,
Tadej -
I think it's just a matter of taste and what you are doing.
Stored procedures are very handy when you don't use dynamic queries (which is probably most of the time).
If you do use dynamically generated queries its better to use the SqlCommand and set the commandtext and use parameters.
What I don't do is using stored procedures for my business logic. This part of the application is contained on the client or on a separate application server. (Using a webservice or remoting). -
It depends on how many RDMS your application will interact. If my will work on SQL Server, MySQL, Oracle i will prefere not to use many SPs, only on those processes that are very difficult to code only on VB.
If you only use 1 RDBMS in your ERP go for it. -
thanks 4 the suggestion guys.. but, i 'm juz curious to know, how u guys r doing a complex business logic embed into the program itself.. for example, processing employee salary in ERP app itself is a big task with mulitiple checks and updation in different tables.. so, like this case, i feel that SP is giving more felexiblity.. isn't it??
-
SQL is a really poor programming language. It's designed for set operations on tabluar data structures, not general-purpose application or business logic. I would advise against using it for business logic. If you wish to take advantage of database-level transactions in your application, you can simply pass a prepared connection to your business-level application objects/procedures, and commit the transaction whenever appropriate.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.