by Gabio (9 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 23rd October 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Aggregate functions and groups with Ado Shape Commands. You can use the opened resultset with Data Report Designer in order to build groupped
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=MSDASQL;dsn=yourDSN;uid=;pwd=;"
sql = "SHAPE {SELECT * FROM YOUR_TABLE} AS YOUR_GROUP COMPUTE YOUR_GROUP,
SUM(YOUR_GROUP.FIELD1) AS SUM1, COUNT(YOUR_GROUP.FIELD2) AS COUNT1 BY YOUR_FIELD_GROUP"
aRec.Open sql, db
Set dataReport.DataSource = aRec
dataReport.Show
No comments have been posted about Aggregate functions and groups with Ado Shape Commands. You can use the opened resultset with Data . Why not be the first to post a comment about Aggregate functions and groups with Ado Shape Commands. You can use the opened resultset with Data .