473,326 Members | 2,111 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,326 software developers and data experts.

Using Typed Datasets in asp.net 2.0

I am having a play with typed datasets in ASP.Net 2.0

I am using the builder to create my data layer.

I have the following tables.

[EmployeeType], [Departments], [Location], and [Groups]

The first three tables above have a one to many relation ship to
[Groups] via mapping tables [EmpType2Group], [Dept2Group] and
[Loc2Group] so each record of the first three tables can be linked to
many groups and each of the first three tables can also be linked to
the same group.

I have stored procedures that will return the groupsByLocation,
groupsByDepartments etc.

Now I have created datasets for each of the tables (empType, dept, loc
and groups) with their appropriate table adapters and get methods.

My question is, where do I add the methods GetGroupByLocation, etc? I
cant add them to the Location dataset as the schema doesn't have a
group field, and I cant add them to the Group dataset (which is were I
would imagine it to go) because there is no locationID field in the
schema.

Any ideas?

Cheers

Amit

Apr 11 '06 #1
2 1328
I would just create a new dataset for the results from your stored
proc, rather than try to insert them into the dataset which has already
been populated. Or am I misunderstanding you?

Apr 11 '06 #2
I think what you might need to do is create a view (or several views) which
includes all the fields you need. So one of your views would have groups
with locationID for example. From this view you can make another dataset,
table adapter, etc.

Will
<am**@c4ppy.net> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I am having a play with typed datasets in ASP.Net 2.0

I am using the builder to create my data layer.

I have the following tables.

[EmployeeType], [Departments], [Location], and [Groups]

The first three tables above have a one to many relation ship to
[Groups] via mapping tables [EmpType2Group], [Dept2Group] and
[Loc2Group] so each record of the first three tables can be linked to
many groups and each of the first three tables can also be linked to
the same group.

I have stored procedures that will return the groupsByLocation,
groupsByDepartments etc.

Now I have created datasets for each of the tables (empType, dept, loc
and groups) with their appropriate table adapters and get methods.

My question is, where do I add the methods GetGroupByLocation, etc? I
cant add them to the Location dataset as the schema doesn't have a
group field, and I cant add them to the Group dataset (which is were I
would imagine it to go) because there is no locationID field in the
schema.

Any ideas?

Cheers

Amit

Apr 11 '06 #3

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

Similar topics

1
by: Geir Holme | last post by:
Hi all. Using Visual Studio VB.NET and SQL Server 2000. When I drag tables from the SQL Server Explorer into a dataset I am building I get the table, fieldnames and types. But, why doesn't it put...
7
by: Tim Smith | last post by:
Hi, Is it possible to create a progam to mimic the following action a) drag oledbadapter to form1.cs b) select my oracle ole connection c) enter 'select * from mytable' d) create adapter for...
2
by: thomson | last post by:
Hi All, What is the difference between a typed dataset and an untyped datset, Where can be this used actually, I mean in which situation which has to be used, In case anyone has got some...
7
by: TJoker .NET | last post by:
I'm developing an VB.NET Windows Forms application that uses CR for VS.NET (original version shipped with VS.NET 2002 - my VS.NET has the latest SP installed, no SPs for CR). My reports get their...
4
by: John Dalberg | last post by:
I noticed the starterkits timetracker & issue tracker load data from a database into custom collections (arraylists) which bind to a datagrid. What are the advantages of using custom collections...
2
by: pabloch2 | last post by:
Why the data access layer should use untyped datasets? and Why the business layer should use strongly typed datasets? Is this applicable to the 3 layered architecture in general or is it related...
12
by: Simon | last post by:
Hi all, I'm having a baffling problem with a windows service that I'm working on. Basically, I am using a typed dataset to insert a large number of rows into an SQL Server 2005 database. But...
4
by: newtonwong | last post by:
I have a web reference WSDL, but it doesn't really create an XSD. I'm trying to generate datasets from the WSDL file but not sure how to do so. I successfully created the proxy class, but the...
4
by: Rachana | last post by:
Hi, I have understood Data Sets but what is meant by typed/untyped/ strongly typed datasets. Can any one explain me or suggest any site/ article, to get these concepts (and their ...
12
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.