Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filling dataset with SP with relational info
Message
De
12/11/2010 14:49:20
 
 
À
12/11/2010 14:15:39
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01488565
Message ID:
01488964
Vues:
34
Thank you, that is exacty the direction I'm going in and I was just about to tackle writing such a utility, as I find XtraReports is quite happy loading an xsd schema, and that will probably do the trick.

I think if I go that way I may stick with my original idea of one sproc per report - pulling all related children in the same pull ( I was just avoiding it because the datasource wizard can only see the first table in a sproc in creating a schema ) but now I'm pretty sure designing the data tables won't be that bad, since I can still have a single sproc to read to grab the schema.

This is slowly starting to sink in. Kevin had a great Bakers Dozen in Code a while back showing how to pass an ilist as a param to a sproc and I've found that invaluable in taking a list of parent keys and passing it to a sproc that grabs related children, but it is easier to maintain if I can just do it all in one pull.

I'll go get your utility now and proceed to ask dumb question <g>

(this is also cool because it reminds me to really pick through your blog - I bet there is a bunch of other stuff there I'm going to need now that I'm getting to a level where I can understand some of it <s> )

>Hi Charles,
>
>Don't know if you got this figured out yet or not ... I've been away from the UT since last week and just saw this thread now. You can write a quickie little utility for creating your .xsd schema. I have the basic code needed in a blog post I wrote:
>
>http://geek-goddess-bonnie.blogspot.com/2010/04/create-xsd.html
>
>All you'd need to add is an easy way to execute that code (create a littly utility form or something). I have done that already, which is what I use when I need to generate an .xsd from a Stored Proc ... but I only posted the essential code in my blog.
>
>Hope it helps ...
>
>~~Bonnie
>
>
>
>
>>>HI, Charles, I have some code that is a bit outdated (in the sense that it doesn't rely on the entity framework....just good old fashioned .NET generics and typed datasets).....but here's what it does:
>>>
>>>1) Suppose I have a typed dataset (call it dsOrders), with relations built in
>>>
>>>2) Suppose I have a stored procedure that I call (either with parameters or without) that retrieves multiple result sets
>>>
>>>3) I want to populate the typed dataset based on the results of the stored proc. So basically...
>>>
>>>MyDataClass.PopulateTypedDataSetFromProc( InstancedofTypedDataSet, "procedureName");
>>>
>>>
>>>
>>>I have a .NET class that does this. Again, a tad outdated, but maybe would still work for you. Let me know if that's what you're looking for.
>>
>>Thanks, Kevin. (I copied you on my reply to Tracy as well ). My problem is simply #1 above. How can I create the schema for that dataset from the sproc itself so i can see it at design time. If I use Add Datasource and point it at a sproc I get the structure of the first table it returns, but it ignores the rest. I like the convenience of having it read from the sproc but I also want to use a single sproc for each report, which will often require multiple tables.


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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform