Solved

How to requery a dataset

Posted on 2006-07-06
3
801 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now