Solved

How to requery a dataset

Posted on 2006-07-06
3
861 Views
Last Modified: 2007-12-19
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
Comment
Question by:techietech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
Shakti109 earned 125 total points
ID: 17054695

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question