counting/summing recordset data

Results 1 to 2 of 2

Thread: counting/summing recordset data

  1. #1
    Join Date
    Dec 1969

    Default counting/summing recordset data

    I have this chunk of code :<BR><BR>&#060;%<BR>Do While Not recordset.EOF<BR> TC = Recordset("value")<BR> TA = Recordset("Amount")<BR> TM = Recordset("number")<BR>%&#062;<BR><BR>&#039; printing the values of TC, TA, TM here<BR><BR>&#060;%<BR>recordset.MoveNext<BR>Loop< BR>%&#062;<BR><BR>TC contains numbers like 12, 13, 24, what I want to do is <BR>to have a sum of all these values stored in TC. and to count how many records were in there? <BR><BR>Any guidance is highly appreciated.<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default recordcount

    use the recordcount property of the recordset. cursor type should be asOpenStatic and you have to set the active connection. check that your provider supports as well.<BR>Cheers<BR>Ian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts