Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Querying DataSet from Four User Controls

Status
Not open for further replies.
Jan 26, 2001
45
0
0
US
Hi I am working on a page which has a tab control on it and for each tab there is a different parameter passed to the stored procedure. There are four different user controls - one for each tab but one common stored procedure. What I would like to do is pull down a dataset of everything when the page loads and then as each user control loads I would like to just pull the data from the dataset created and filter it on each page. This is to save running the procedure four times and to enable the page to load quickly. I'm just not sure of how to set the dataset to be accessible by the controls and then how to filter the data for binding to a datagrid.

Any help would be gratefully received.

Cheers

Andrew

Andrew Westgarth
Web Developer
 
Andrew

A DataSet simply contains DataTables.

You could populate your DataSet with all 4 instances of data you require, and give each a new mapping name, which is the name of the datatable.Its hard to direct you much further on this without knowing how you initially populate the Dataset

You can get at the Datatables in the Dataset, using the Dataset.Tables collection

eg ds.tables(0).rows.count
or ds.tables("Table1").rows.count



Sweep
...if it works dont mess with it
 
Thanks Sweep.

I initially fill the dataset with the results of a stored procedure at the initial page load, before the user controls are created. I want to then with each user control query the one single created dataset and pull out a selection of the dataset based on the salesperson's ID.

Does this enable you to help me further?

Cheers

Andrew

Andrew Westgarth
Web Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top