Article View: alt.pl.comp.lang.csharp
Article #21070Re: windows forms i bazy danych
From: wloochacz
Date: Tue, 06 Oct 2009 12:03
Date: Tue, 06 Oct 2009 12:03
29 lines
2523 bytes
2523 bytes
yamma pisze: > wloochacz wrote: >> 3P pisze: > >>> Ponieważ zalecaną metodą pracy jest tworzenie połączenia na czas >>> zapytania i zamykanie po jego wykonaniu >> Bzdura. >> Kto to zaleca w WindowsForms? >> Gdzie to jest napisane? >> Pokaż proszę. > > http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx > "We strongly recommend that you always close the connection when you are > finished using it so that the connection will be returned to the pool. > You can do this using either the Close or Dispose methods of the > Connection object, or by opening all connections inside a using > statement in C#, or a Using statement in Visual Basic. Connections that > are not explicitly closed might not be added or returned to the pool." Tu jest napisane, że oni mocno zalecają zamykanie nieużywanego połączenia, żeby wróciło do puli. A nie tego, że mocno zalecają używania connection pooling. Żeby była jasność; Connection Pooling w ADO.NET przy połączeniach z SQL Server jest bardzo OK i absolutnie nie jestem jej przeciwnikiem. Ale nie jest to globalna zasada, która dotyczy wszystkiego i w każdej sytuacji. -- wloochacz
Technical Details
Message-ID:
<hafbo1$1pp$2@atlantis.news.neostrada.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!not-for-mailReferences:
<3489e71f-a9c5-4e6a-9c8e-4277001d27bc@m11g2000yqf.googlegroups.com> <ha3ac0$hgl$2@nemesis.news.neostrada.pl> <ha4i1f$4d9$1@nemesis.news.neostrada.pl> <ha4p6t$3nu$1@news.wp.pl> <ha4rg5$emt$2@atlantis.news.neostrada.pl> <ha4s9n$5b4$1@news.wp.pl> <ha51bp$qgu$2@nemesis.news.neostrada.pl> <op.u06mdg0fmsp0fz@mcs> <hacism$53m$1@nemesis.news.neostrada.pl> <op.u1b911l6msp0fz@mcs> <haf3b7$bqo$1@atlantis.news.neostrada.pl> <haf8ir$m5o$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!news.nask.pl!news.nask.org.pl!newsfeed.neostrada.pl!atlantis.news.neostrada.pl!news.neostrada.pl!not-for-mail From: wloochacz <nospam.wloochacz@nospam.dgbit.pl> Newsgroups: alt.pl.comp.lang.csharp Subject: Re: windows forms i bazy danych Date: Tue, 06 Oct 2009 14:03:44 +0200 Organization: TP - http://www.tp.pl/ Lines: 29 Message-ID: <hafbo1$1pp$2@atlantis.news.neostrada.pl> References: <3489e71f-a9c5-4e6a-9c8e-4277001d27bc@m11g2000yqf.googlegroups.com> <ha3ac0$hgl$2@nemesis.news.neostrada.pl> <ha4i1f$4d9$1@nemesis.news.neostrada.pl> <ha4p6t$3nu$1@news.wp.pl> <ha4rg5$emt$2@atlantis.news.neostrada.pl> <ha4s9n$5b4$1@news.wp.pl> <ha51bp$qgu$2@nemesis.news.neostrada.pl> <op.u06mdg0fmsp0fz@mcs> <hacism$53m$1@nemesis.news.neostrada.pl> <op.u1b911l6msp0fz@mcs> <haf3b7$bqo$1@atlantis.news.neostrada.pl> <haf8ir$m5o$1@inews.gazeta.pl> NNTP-Posting-Host: plast-box.pl Mime-Version: 1.0 X-Trace: atlantis.news.neostrada.pl 1254830657 1849 195.205.119.237 (6 Oct 2009 12:04:17 GMT) X-Complaints-To: usenet@news.neostrada.pl NNTP-Posting-Date: Tue, 6 Oct 2009 12:04:17 +0000 (UTC) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <haf8ir$m5o$1@inews.gazeta.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit