>Hi Cetin.
>Once I have made connection, is it good practce in C# to 1) pass these connection to other functions (like in your example, can I pass variable cn and cmd to other functions) or 2) should I create more connections as I need them in my functions and close them as I finish.
>
>BTW: I haven't tried the former yet... don't know if I can.
>
>Thanks.
>
Sam,
You can pass the references to other methods. However in .Net you work with disconnected sets. IOW open/close them as needed (many methods automatically open/close them w/o you explicitly saying cn.Open()).
Cetin