Results 1 to 2 of 2

Thread: a question of efficiency

  1. #1
    Guest

    Post

    which is the most efficient?

    to keep opening and then closing
    workspaces and database object variables
    within procedures or..

    to keep them open
    with different variables?


  2. #2
    Lively Member
    Join Date
    Jan 2000
    Location
    North Yorkshire
    Posts
    102

    Post

    Keep them open using just one variable. Just make sure the scope is what you want. I ususally have a module / class that has a module level (i.e., Dimmed in the declarations section) of the database connection, i.e., the actual database. Then when I want to use it, from a function within the scope, i.e., in that module / class, just create a local instance of say a recordset and just use that.

    That way you only need to open the connection once (which for something like Oracle) can take a noticable time.

    Hope this helps

    cheers

    Andy

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