VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Aggregate functions and groups with Ado Shape Commands. You can use the opened resultset with Data

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

Rate Aggregate functions and groups with Ado Shape Commands. You can use the opened resultset with Data



    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

Download this snippet    Add to My Saved Code

Aggregate functions and groups with Ado Shape Commands. You can use the opened resultset with Data Comments

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 .

Post your comment

Subject:
Message:
0/1000 characters