Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filling dataset with SP with relational info
Message
From
09/11/2010 13:47:10
 
 
To
09/11/2010 13:37:13
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01488565
Message ID:
01488632
Views:
37
>>>>>>As I think about it, I would not be surprised if I needed a separate sproc for each table and if I can't do the multiple table pull from one sproc - that maybe some strataframe jiggery pokery that is not native to .NET ???
>>>>>>
>>>>>>So basically the problem is that since I have to write the sprocs anyway, I don't want to have to manually write datasets or entity classes as well for each sproc.
>>>>>
>>>>>
>>>>>I am not sure about your design time issue, but I will confirm that we return as many as 53 tables from a single sproc. We pass an array of table names to the DAL to create a usable DS. However we don't use VS to maintain our SQL code, we maintain our sprocs
>>>>>via SSMS.
>>>>
>>>>Thanks, Bruce. I'm fine with maintaining the sprocs from SSMS. The part I am confused about is how to see the structures of the tables in the dataset at design time. It is only an issue in that when designing the reports I think I need to be able to bind the report controls to members of the dataset and that would seem to mean I need to have the dataset available in the data explorer at design time. I tried pointing the date explorer at a sproc returning multiple tables but it only seems to see the first table and put its structure in the treeview. Do you know how I might get the structure of the multitable sproc to show up in the data explorer? I think I need them there in order to use them to design my reports.
>>>
>>>
>>>Sorry, I'm not much help there. We do very little reporting out of our system, generally simple textual reports.
>>>
>>>Could you use something like DataSet.WriteXML to create an xml file to use with the designer?
>>
>>My problem is in finding a way to use the sproc to create the schema of the dataset. Once I have a dataset with the right schema at design time I can take it from there. I just find defining all those datasets to match my sprocs will be tedious and I am hoping to avoid it.
>
>Charles, I am just curious about the strataframe stuff here. Do your biz objects have a method to GetDataSet or something after retrieving the data?
>Tim

Each business object has a currentdataview with a record pointer that actually moves on navigation. It does have a getenumerable method that implements ienumerable so you can iterate the cursor
For each bo  as mybo in me.mybo1.getenumerable()
  bo.myvalue += 1
Next
for example.

I could copy the currentdatatable of each bo to a corresponding datatable (or just reference it mybo.currentdatatable("myfield").value)

but my real problem is in having a schema exposed at design time to bind my report objects. I understand this stuff at run-time but pointing to abstractions like schemas from sps at design time seems trickier. It is a quesiton of the graphic interface of the report designer and picking what an object will bind to, without just naming the object and writing 1000 lines of run-time binding code to hook it all up.

Simple with an sp that returns a single table, but that makes the sp a lot more complicated to get the right record set for child stuff, since you first have to have the pull from the parent sp and the set of keys to get the relevent children.


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.
Previous
Reply
Map
View

Click here to load this message in the networking platform