Perform aggregate functions on Dataset

Hi,

Iam working on a project that involves getting the data from Lotus Notes and displaying the data in a web form. I am making use of a tool called NotesSQL, that converts the data from Lotus notes into any conventional database. It also provides a database connectivity between the front end and Lotus notes.

The following is a little description about my project:

Front-end :- ASP.Net

Backend - Lotus Notes

Connectivity using :- Notes SQL

Iam able to create the connectivity between the backend and my web form. Iam creating the connection using ODBC Connectivity and have the required data in a DataSet. The problem with Lotus notes is, it doesn't allow any aggregate functions to be performed on the data, while creating the dataadapter. Hence, what I have to do is typically issue a statetement:

da=new OdbcDataAdapter("select * from helpdesktickets",con) ;

where helpdesktickets is a view (considered as a table in Lotus notes).

What I want to achieve now is for suppose, if I want to know the count of tickets in the month of June, then I cannot give a statement like "select count(*) from helpdesktickets where month(openedon)=6 and year(openedon)=2006" because it doesn't support it. The only possibility is I have to load all the records probably of this year, something like "select * from helpdesktickets where month(openedon)=6 and year(openedon)=2006". I cannot perform a count on these records.

The following are my queries:

1) How can I perform aggregate functions like count, max or min on the data that I already have in dataset.

2) Also, how can I retrieve only a few columns from all the columns in the dataset

Please help me guys !!!



Answer this question

Perform aggregate functions on Dataset