Using Typed Datasets in asp.net 2.0

A

amit

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
 
K

KBuser

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?
 
W

William Buchanan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top