Record Count

Results 1 to 3 of 3

Thread: Record Count

  1. #1
    Join Date
    Dec 1969

    Default Record Count

    I need to be able to get a record count<BR><BR>In the past I&#039;ve done it like this...<BR><BR>&#060;%<BR>&#039; THIS CODE SHOWS THE ACTUAL RecordCount<BR>RS.Open SQL, Connection, adOpenStatic, adLockReadOnly<BR>response.write RS.RecordCount<BR>%&#062;<BR><BR>I&#039;ve inherited some code that looks like<BR><BR>&#060;% multSQL = "Set textsize 0 Select * from tasks where current_level = &#039;6.1&#039; and model = &#039;1&#039; order by task"<BR> objConn<BR>Set multRST = con.execute (multSQL)<BR>%&#062;<BR><BR>How do I specify the cursor type in the second example? I&#039;m using<BR>a MS SQL database

  2. #2
    Join Date
    Dec 1969

    Default Can't set it with..

    .. Connection.Execute().<BR><BR>You get a adOpenForwardOnly, adLockReadOnly recordset w/ .Execute().

  3. #3
    Join Date
    Dec 1969

    Default How much can you modify?

    If you can modify this code, then you can replace the execute command OR you could ad a count(*) field to the query OR -- and this is only a good option if you plan on using the array rather then the recordset -- you could dump the recordset into an array using getrows() and determine the upper bound of the array. If you are only returning a few records, though, getrows() is actually worse then using the recordset.

Posting Permissions

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