Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Stored Proc in BLL or DAL??

Posted on 2006-11-03
7
Medium Priority
?
655 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
ID: 17868537
fdsfsdfsdf
0
 
LVL 7

Author Comment

by:Camillia
ID: 17868593

 Not funny.
0
 
LVL 10

Expert Comment

by:bchoor
ID: 17868600
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 10

Expert Comment

by:bchoor
ID: 17868605
oops--didn't realize that
0
 
LVL 7

Author Comment

by:Camillia
ID: 17868626
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 2000 total points
ID: 17868752
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
ID: 17869693
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

885 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