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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query against a DataSet

Status
Not open for further replies.

dotnetprogrammer

Programmer
Aug 17, 2000
77
US
Can you execute query against a DataSet?

I do not mean calling the Filter() function; I mean executing an SQL query with COUNT, SUM and GROUP BY command.
Is it possible? If not, is there a way around?
Thanks,
fred
 
The true one, you cannot but SUM, COUNT, AVG, Min,Max, StDev ... and other functions could be done using DataColumn.Expression property.
Example:
m_DataTable.Columns("NumOfRecords").Expression = "Count(CustomerID)";
m_DataTable.Columns("ZipCode").Expression = "SUBSTRING(Address,15,7)";
I think if you combine calculated columns and using Sort on DataView you could achive group by.
-obislavu-





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top