set rs = conn.execute(sql) vs. sql, conn

Results 1 to 2 of 2

Thread: set rs = conn.execute(sql) vs. sql, conn

  1. #1
    Join Date
    Dec 1969

    Default set rs = conn.execute(sql) vs. sql, conn

    i&#039;m curious about the advantages/disadvantages of using<BR><BR>set rs = conn.execute(sql)<BR><BR>vs.<BR><BR> sql, conn<BR><BR>(with rs being a recordset, sql a string containing a sql statement, and conn being an open database connection)<BR><BR>what are the advantages for using one over another? is there any performance differences?<BR><BR>thanks,<BR>-ron

  2. #2
    Join Date
    Dec 1969

    Default Not much difference...

    If you are going to just open the recordset for read only and forward only use, then there&#039;s a very minor performance advantage using Connection.Execute. Reason: One fewer VBScript statements to execute, and VBS is horribly slow compared to what the C++ code in the ADO component can do. <BR><BR>Of course, if you need any other kind of access to the recordset, then you have to use RecordSet.Open, but I presume you knew that.<BR><BR>

Posting Permissions

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