Results 1 to 4 of 4

Thread: Advice required about sqlconnection

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2003
    Posts
    784

    Advice required about sqlconnection

    Dear The Expert,
    Which better .. to always open the sqlconnection until the application closed or to open the sqlconnection only when it required? ..
    I need advice .. many thanks in advance

    Regards
    Winanjaya

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    You open the connection ONLY whenever needed . There's no advantage of leaving the connection open from the moment you start your app till you close it .

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2003
    Posts
    784
    But .. how if I want to implement Commit and RollBack for WAN Application? this is for network connection consideration..
    pls advice .
    thanks

    Winanjaya

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    If you explicitly , open the connection you must close it when you finish . If you open it implicitly , then you don't have to close it because it closes automatically when using the dataAdapte's fill or update method . That's it .

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