473,394 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Data Access Layer Calls

Hi everyone,

Maybe a silly question but if i have DataService1 - 5 in my data access
layer, and DataService3 returns a dataset that contains many fields,
one of which is a foreign key. The foreign key belongs to a table that
i retrieve using DataService 4.

Is it ok, to call the DataService4 retrieve method, from within
DataService3, or should i write it as part of the SQL for
DataService3??

If this doesnt make sense, i am sorry.lol

Sep 27 '06 #1
1 1119

When I am "merging" data. I usually do this in the business layer.

Lets say I have Orders in one database, and ProductStock in another.

BizLayer
DataObject1 do1 = new DataObject();
DataSet ordersDs = do1.GetOrders();

DataObject2 do2 = new DataObject2();
DataSets inventoryDs = do2.GetProducts();

DataSet masterDs = null;
masterDs = ordersDs;
masterDs.Merge(inventoryDs);
Something like that.

..Merge can merge tables. It can merge ~different rows. You'll have to
experiment with overlapping rows, its not very friendly.

But I would keep my datalayer objects seperated. datalayer objects should
be pretty dumb.

http://sholliday.spaces.live.com/?_c...26ayear%3d2006
I might check my May and June 2006 blog entries.


"Nemisis" <da*********@hotmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi everyone,

Maybe a silly question but if i have DataService1 - 5 in my data access
layer, and DataService3 returns a dataset that contains many fields,
one of which is a foreign key. The foreign key belongs to a table that
i retrieve using DataService 4.

Is it ok, to call the DataService4 retrieve method, from within
DataService3, or should i write it as part of the SQL for
DataService3??

If this doesnt make sense, i am sorry.lol

Sep 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sedefo | last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i was researching how i can write a database independent data access layer. In my company we already use Data Access...
4
by: Oyvind | last post by:
I'm working on a Windows forms/C# database application. My background is 6-7 years of VB 4 - 6, MS Access, VC++, mixed in with a lot of T-SQL and MS SQL Server in general and some OOA/OOD. ...
41
by: laimis | last post by:
Hey guys, I just recently got introduced to data mappers (DTO mapper). So now I have a SqlHelper being used by DTOMapper and then business layer is using DTOMapper when it needs to persist...
1
by: Johann Blake | last post by:
I am looking for a good solution on how to implement data access in an application so that there is a clean separation between the data access layer, the business layer and the GUI layer. I am...
5
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can...
2
by: headware | last post by:
I'm relatively new to ASP.NET and ADO.NET, but I have a basic design question regarding the use of web services and APS.NET applications. Right now we have an application that uses web services to...
18
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
2
by: asad | last post by:
hello, how ru all pls tell me how can i create DAL and how can i use it in my ASP.NET pages thanks
5
by: Tina | last post by:
I'm reading about the "3-tier" design afforded by using Object Data Sources in the App_Data folder in 2.0 asp.net projects. To me, putting an object data source in a separate folder on the web...
3
by: kbutterly | last post by:
Good morning, I have seen two different types of data access layers and I am wondering which, if either, is considered best practice, or if one is better suited to certain situations than the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.