|
-
Jul 14th, 2003, 09:52 PM
#1
Thread Starter
Sleep mode
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 ??
-
Jul 15th, 2003, 12:12 AM
#2
Frenzied Member
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
-
Jul 15th, 2003, 07:12 AM
#3
Thread Starter
Sleep mode
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 .
-
Jul 15th, 2003, 09:49 AM
#4
There shouldn't be any bad side to using multiple connection objects as long as you close them.
-
Jul 15th, 2003, 10:40 AM
#5
Thread Starter
Sleep mode
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|