Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filling dataset with SP with relational info
Message
De
08/11/2010 23:10:33
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Filling dataset with SP with relational info
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01488565
Message ID:
01488565
Vues:
151
I am writing a module in my app to use DevExpress XtraReports. It seems they like datasets with relational information. Soooo

In my Strataframe business objects I tend to use stored procedures that return multiple tables. If I have a single parent record with 5 child tables, I will pass the pk of the parent as the param to my sp and fill 6 BOs on one trip to the server. Sometimes I'll fill the parent with one sp and then all the children from another.

If I have a set of parents I will usually do everything in one sp so the result set of the parents can be used create the collection of foreign keys to pull all the related children ( the framework takes care of dynamically filtering the chlidren on navigating the parent )

I can use these business objects with XtraReports, but my understanding is the master-detail stuff is more easily handled with datasets.

I don't really need the business objects for the XtraReports and it seems regular datasets will be easier but I see that when I use the Visual Studio 2010 add new datasource wizard and select the sp that returns multiple tables only the schema of the first table makes it into the treeview. Is this to be expected and should I just have a separate stored proc for each table or is there a trick to returning multiple tables and having the schema builder see the structure so that the structure is there for building the report?

If this isn't viable I'll probably stick to my BOs and just copy into the datasets, but getting structures into the datasets at design time may be a PITA

Any suggestions, guidance appreciated. I can see advantages to pulling all the data on one trip but I need the structures at design time to build the reports.

TIA


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform