<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Access Databases and AccessDataSource Control</title><link>http://forums.asp.net/55.aspx</link><description>Discuss using Access as a data store for ASP.NET, and the AccessDataSource control.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Handling connections to MS Access database</title><link>http://forums.asp.net/thread/3261161.aspx</link><pubDate>Fri, 26 Jun 2009 23:07:43 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3261161</guid><dc:creator>mbanavige</dc:creator><author>mbanavige</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3261161.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=55&amp;PostID=3261161</wfw:commentRss><description>&lt;p&gt;The technique that is generally preferred is to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the db connection as late as possible&lt;/li&gt;
&lt;li&gt;Close that db connection as soon as possible&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;This means, do not open your db connection until you are ready to execute a statement against the db and then immediately after&amp;nbsp;accessing your db, you would&amp;nbsp;want to close that connection.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;AnnaMaria:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;But is it ok to open a new connection for each SQL command?&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Yes - .NET will handle connection pooling for you so that performance won&amp;#39;t suffer.&lt;/p&gt;</description></item><item><title>Handling connections to MS Access database</title><link>http://forums.asp.net/thread/3261131.aspx</link><pubDate>Fri, 26 Jun 2009 22:26:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3261131</guid><dc:creator>AnnaMaria</dc:creator><author>AnnaMaria</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3261131.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=55&amp;PostID=3261131</wfw:commentRss><description>&lt;p&gt;Hallo,&lt;/p&gt;&lt;p&gt;I&amp;#39;m developing a web interface to a MS Access database with ASP.NET 3.5. There are about 10 users. I guess that each of them will have a look into the database 20 times per day and will add about 20 new records per day.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Now I&amp;#39;m thinking about the best way to handle the connections to the database.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Keeping a single connection during the whole session does not seem to be a good idea as a session might last a whole day.&lt;/p&gt;&lt;p&gt;But is it ok to open a new connection for each SQL command?&lt;/p&gt;&lt;p&gt;Is there any other possibility?&lt;/p&gt;&lt;p&gt;Thanks in advance,&lt;/p&gt;&lt;p&gt;Anna&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>