Query recordset or query array??

Results 1 to 3 of 3

Thread: Query recordset or query array??

  1. #1
    joebarker90 Guest

    Default Query recordset or query array??

    Please can someone tell me which is the most efficient in ASP <BR>- to loop thru a recordset and extract the information, OR dump the contents of the recordswet to an array, then close the db connection and loop thru the array?<BR><BR>Also, is it better to have multiple reponse.writes or append the output to a string variable and then have 1 response.write to write the contents of the variable at the end?

  2. #2
    Join Date
    Dec 1969

    Default RE: Query recordset or query array??

    It would seem a bit inefficient to dump the contents of a recordset into an array, and then loop through the array to find some information. I&#039;s better to loop through the recordset to find that information. If you are worried about open DB connections, you can disconnect the recordset from the connection by <BR>Set MyRecordset.ActiveConnection = Nothing<BR><BR>It is better to have multiple response.writes, that&#039;s more efficient than string concatenation.

  3. #3
    joebarker90 Guest

    Default Thanx....Ill go back and change my code


Posting Permissions

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