You are not required any open source. first i will say, try to avoid openning lots of connection. normally only one connection can work - i personally do not see any case where more than two connection is required. It is always good practice to open one connect at a time.
About how to open and close connection and work with connection, i will advice, fire a query on google.com or use MSDN where you will find thousands of already written code. i think, you may find some useful information on http://ashishkhandelwal.arkutil.com Hope this will help.
