I don't see a spot in my data access tier to set a sp....i must be missing something.
right now i'm directly calling sp from my business tier, but i think it should be moved.
Main Topics
Browse All TopicsI have a .Net 2008 web site in which i have split up my business logic and data access. My data access is currently only for selection. I want to have all update/insert/delete performed against db done from a stored procedure. So I will need to call this sp from within the ap. Right now I have it in my business logic area and not in data access. How do I go about calling a sp from data access or am I even suppose to put it there. A lot of examples i see out there are updating against the adapter which from what i see is direct access to the table.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
well i'm in my data access layer now. i have all my direct table access queries setup (ie. getallvalues(), getvaluesbyid(id), getvaluesbygroupingid(grou
inside my BLL I access these to select data.
then from my web form i access the BLL, so 3 tier, working fine.
now currently in my BLL i have an update procedure setup beginning with the following code:
<System.ComponentModel.Data
So when i make a call to this procedure, it knows its an update one.
This is where i am currently executing my sp...code attached below...
What i'm wondering is if this is the right place to be doing this. I thought the actual update was suppose to take place in the DAL and not the BLL, but i don't see a way to make this work.
I understand that the DAL is returning an sqladapter, so in the normal case when you do a .Update it is going back to the table. but is there a way to do a .Update in my case or is this the way to do it.
Hope this makes sense, I'm new to this and just getting my feet wet!!
for anyone else with the same problem .. found a good site..
http://www.asp.net/Learn/d
Business Accounts
Answer for Membership
by: daveamourPosted on 2009-09-18 at 00:06:00ID: 25363398
I would do it like this - using an example to explain
Users edits record on web form (aspx page) and clicks submit
Code behind on web form creates instance of record which lives in the business tier, sets properties and calls Save. The business tier record object then calls Save against some code in the data access tier which talks to the database via the stored procedure.
Web app has reference to Business tier
Business tier has reference to Data Access tier
Does that help?