Adding in ADO 
Author Message
 Adding in ADO

I was wondering what would be the best way to add up records that have specific
information and then save (temp) them somewhere (recordset).

e.g.   Database of students that have received one or more certificates from the
school.   I want to determine how many and which students have received more than
5 certificates this year.   Each student has a unique student ID and this
information needs to be stored somewhere and be printed when needed.

What do I do?

ChubbieJo



Sun, 30 Nov 2003 01:35:54 GMT  
 Adding in ADO
Hi.

You can use this SQL statement to sort out all the students with 5 or more
certificates.

SELECT tblStudents.ID, tblStudents.Name, Sum(tblStudents.certificates) as
CountCertificate
WHERE tblStudents.Year=2001 AND tblStudents.Certificates >= 5
GROUP BY tblStudents.ID, tblStudents.Name

The statement was written on the fly and I havent tested it, but I think you
can use some of the elements in it.

You can then export the recordset to csv or xls or xlm and then store them,
print them.... You can also display your recordset in a report in VB and
then print them out.

Check out www.planet-source-code.com to find code. ADO and export to csv,
xls.

Good luck

Hans-Petter Eitvet
-------------------------------------



I was wondering what would be the best way to add up records that have
specific
information and then save (temp) them somewhere (recordset).

e.g.   Database of students that have received one or more certificates from
the
school.   I want to determine how many and which students have received more
than
5 certificates this year.   Each student has a unique student ID and this
information needs to be stored somewhere and be printed when needed.

What do I do?

ChubbieJo



Sun, 30 Nov 2003 02:44:10 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to add the ADO reference in outlook by progrmming

2. How to add several ADO connections to Crystal Reports

3. delete after add with ado wizard.

4. FOUND: MS VB Add-In: ADO Stored Procedure Code Wizard

5. Can't see newly added records - ADO recordset will not refresh/requery?

6. ADO ADO ADO ADO ADO VB examples / samples book wanted

7. Add a record: ADO?

8. A2000: ADO->BindingCollection.Add() Runtime error 2185 ?

9. Problem adding a new record with ADO

10. how to add ADO reference to user outlook by programming

11. adding a record to access database using ado.net

12. retrieving primary key of newly added record in ADO.NET

 

 
Powered by phpBB® Forum Software