are there any articles...

Results 1 to 2 of 2

Thread: are there any articles...

  1. #1
    Join Date
    Dec 1969

    Default are there any articles...

    about why conn.execute is better than

  2. #2
    Join Date
    Dec 1969

    Default Define ''better''

    It&#039;s only better in limited circumstances:<BR><BR>(a) When you want (or can use) an adOpenForwardOnly cursor.<BR>(b) When you don&#039;t need write access to the recordset.<BR><BR>After that, it&#039;s really only "better" by the advantage of using one fewer lines of VBS code. Which is significant, giving how slowly VBS executes code lines. Which is insignificant if the SQL query does any major work (the VBS time can often be miniscule in comparison to the DB time).<BR><BR>One reason I like it is that it forces people to use a connection *object* instead of a connection string. Does that matter? Not if the user only opens one recordset on the page. But if you open more than one, then having the connection object separate means only one connection per page. You don&#039;t overload the connection pool. If you use a connection string with RS.OPEN then you end up with a new connection per recordset.<BR><BR>Is any of this a really really big deal? Hell, no. I&#039;m just being my usual pedantic self when I suggest cutting out one line of code.<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