Results 1 to 2 of 2

Thread: Connect once or every time

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2002
    Location
    Sharpsville, PA
    Posts
    135

    Question Connect once or every time

    I have some code where I open the connection at the begining
    of the app, and run sql statements or "commands" seperatly at various points in the app. However I have some sample code that bundles the two together, o_adapter = New OleDbDataAdapter(s_command, o_connection) which I think means I am going to
    re-establish a connection every time I issue a command. Is this
    not inefficient if you are going to execute commands frequently?
    Just want to decide which way to go. BTW db is Oracle.

    Thanks
    Tom

  2. #2
    Addicted Member
    Join Date
    Mar 2001
    Location
    Devon, UK
    Posts
    181
    I was always told to connect everytime over a network and if there may be a time gap of any length between commands i.e requires some kind of user action instead of pure code running.
    Wind and waves resolves all problems.

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