Connection in Win App
hi,
want to ask something..
in .NET Win App what is the prefer method
1. Open connection when program start and Close it when program end
or
2. Open connection whenever it needed and close it after that
thanks
[252 byte] By [
erickwidya] at [2007-11-19 10:50:58]

# 1 Re: Connection in Win App
Generally, its better to consolidate your statements against the database and open/close a connection when needed.
Heres some good reference material:
http://msdn.microsoft.com/msdnmag/issues/05/05/DataPoints/default.aspx