Solved

Stored Proc in BLL or DAL??

Posted on 2006-11-03
7
636 Views
Last Modified: 2008-02-26
I asked this question yesterday:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_22047143.html

That was a test code: testing my DAL Layer.

What I have is a class in BLL which calls a stored proc. The BLL is calling DAL for database connectivity stuff....

I was thinking about it...that class should be in DAL ..correct? I think DAL should call a stored proc, result is passed to BLL and BLL does whatever it needs to do and pass the result back to UI...

I dont think it's correct to have code in BLL to call stored procs or call database directly..is this correct?
0
Comment
Question by:Camillia
  • 4
  • 3
7 Comments
 
LVL 10

Expert Comment

by:bchoor
Comment Utility
fdsfsdfsdf
0
 
LVL 7

Author Comment

by:Camillia
Comment Utility

 Not funny.
0
 
LVL 10

Expert Comment

by:bchoor
Comment Utility
I'd stick with the DAL for DB connectivity.

The test procedure you have in your DAL - is it just for testing purposes and will be removed before packaging. If so, you can look into using nUnit and other testing add-ons for VS. They will allow you to create a new project so keep any DB connectivity outside of the BLL.

HTH
~BC
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 10

Expert Comment

by:bchoor
Comment Utility
oops--didn't realize that
0
 
LVL 7

Author Comment

by:Camillia
Comment Utility
I do have database connectivity outside BLL, in DAL.

BUT, I have the test stored proc in my BLL not in DAL...and that's what i want to know moving forward...

Should I call stored proc/database "select"/"update"/"insert" from DAL or from BLL?
0
 
LVL 10

Accepted Solution

by:
bchoor earned 500 total points
Comment Utility
yes, I would keep it in the DAL.

I'm a bit confused, what's the test stored procedure for?
0
 
LVL 7

Author Comment

by:Camillia
Comment Utility
The test stored proc was to see if I can get results back from the DAL and if it connencts to SQL Server and IBM iSeries...

Then i thought about the 3-tier and was wondering where the stored proc belongs...

Never used nUnit, will look into to.
thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now