Solved

Stored Proc in BLL or DAL??

Posted on 2006-11-03
7
646 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 500 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

615 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