Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 897
  • Last Modified:

How to requery a dataset

Hi,

Iam working on a ASP.Net project. Iam pulling the data from Domino server and dumping into a dataset. The dataset contains the set of records. I want to perform a SQL query on that dataset, which also include aggregate functions. The resultant data, i would like to display into a datagrid.
0
techietech
Asked:
techietech
1 Solution
 
Shakti109Commented:

When you get the dataset back, you can use table.compute functions to do things to it.

Check out the documentation at :
http://msdn2.microsoft.com/en-us/library/system.data.datatable.compute.aspx

To display the data in a datagrid, simply set the datasource property of the grid to the table within the dataset you create (either the derived dataset based on your calls to datatable.compute, or the original one).

Like : Me.DataGrid1.DataSource = newdataset.Tables(0)

For simple selects from a table within a dataset look at the .Select method of the datatable class which is described in the documentation as :
Public Function [Select](ByVal filterExpression As String, ByVal sort As String) As System.Data.DataRow()

An example is : SourceTable.Select("name = bob")
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now