Results 1 to 5 of 5

Thread: Multiple Connection Objects !

  1. #1

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Multiple Connection Objects !

    Hmm , I used to answer such question but now I'm asking here because I got confused . I like to have one connection obj (and I used to ) but I had to change that theory to declare the conn obj in each function I have . Now , I know the advantages , what are the disadvantages of adopting this way ??

  2. #2
    Frenzied Member moinkhan's Avatar
    Join Date
    Jun 2000
    Location
    Karachi, Pakistan
    Posts
    2,011
    Disadvantages of what? of using multiple connections or of using single conneciton?
    Well... ADO.Net has a disonnected design. Datasets can hold data and you can perform any operations on that data without any live connection to the real datasource... so once the data is in datasets.. u don't need any open connections so it is always a best practice to close the connection as sooon as u get your datasets populated with data to save system resources...
    So it is advantageous to make the connection on Demand...
    Disadvantage may be the time in creating the connection object multiple times.. but it is negligible...
    Hope this helps

  3. #3

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I already know that dude but I was asking about bad side of using multiple oledbconnection obj in one proj . I used to have only one connection obj , but for some , few, cases I may have to use couple of them . That's the point .

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    There shouldn't be any bad side to using multiple connection objects as long as you close them.

  5. #5

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Thanks

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