Results 1 to 15 of 15

Thread: (RESOLVED) Performance question (recordsets and loops)

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Krass's Avatar
    Join Date
    Aug 2000
    Location
    Montreal
    Posts
    489

    Resolved (RESOLVED) Performance question (recordsets and loops)

    My application will lookup a database every 10 seconds to see if it has received a special command.

    I am using a timer which, every 10 secs, will <<Set rstReceiveOrders = DB_Browsers.OpenRecordset("sqlstring")>> and check its content to take action. The "rstReceiveOrders" recordset is declared at the top of my form's code.

    Question #1: Would it be faster to declare the recordset every time the timer is executed? That would mean declaring a recordset variable and setting it to something every 10 seconds. I thought that declaring it at the top of my form's code would make execution faster because I won't have to declare it every 10 seconds. (of course I am closing/emptying it each time the timer is done executing).

    Question #2: Would it be faster, in the form_load (or somewhere else in the beginning of my application) to SET the recordset, and then only "REFRESH" the recordset on the timer and check its updated content?

    Any tips greatly appreciated. Note that in that particular case, I am more looking for a less-CPU usage solution rather than a less-MEMORY usage solution. This application will run 30-40 times SIMULTANEOUSLY on one single CPU (72kb app).

    thanks
    Last edited by Hack; Jul 27th, 2006 at 07:53 AM. Reason: Added green "resolved" checkmark Last edited by Krass : 07-24-2006 at 10:05 PM. Reason: (RESOLVED)
    Chris

Posting Permissions

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



Click Here to Expand Forum to Full Width