<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.developerdotstar.com/community" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>developer.* Blogs - Using Data with ASP.Net - 10 of my &amp;#039;Best Practices&amp;#039; - Comments</title>
 <link>http://www.developerdotstar.com/community/node/531</link>
 <description>Comments for &quot;Using Data with ASP.Net - 10 of my &#039;Best Practices&#039;&quot;</description>
 <language>en</language>
<item>
 <title>Storing data in database</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1601</link>
 <description>&lt;p&gt;Hai,&lt;/p&gt;
&lt;p&gt;I did a website in that if i post some information in 2 seperate line, during i view the post it display in single line. Am did this in asp and acess database.&lt;/p&gt;
&lt;p&gt;Can you sugges me about this problem.&lt;/p&gt;
</description>
 <pubDate>Wed, 25 Oct 2006 00:49:41 -0700</pubDate>
 <dc:creator>kabilan</dc:creator>
 <guid isPermaLink="false">comment 1601 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Using Close or Cancel</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1515</link>
 <description>&lt;p&gt;Dino Esposito in Programming ASP.NET 2.0 also echoes the author&#039;s suggestion about canceling rather than just closing.  While Dino doesn&#039;t say the remaining records are read before the close occurs, he does say that resources become available much more quickly by using the suggestion.&lt;/p&gt;
</description>
 <pubDate>Sat, 16 Sep 2006 10:47:15 -0700</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 1515 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>If you can cache it think first</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1494</link>
 <description>&lt;p&gt;See my post &quot;&lt;a href=&quot;http://www.developerdotstar.com/community/node/576&quot;&gt;Caching Considered Harmful&lt;/a&gt;.&quot;&lt;/p&gt;
</description>
 <pubDate>Sun, 10 Sep 2006 08:10:14 -0700</pubDate>
 <dc:creator>Edward G Nilges</dc:creator>
 <guid isPermaLink="false">comment 1494 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Caching....</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1427</link>
 <description>&lt;p&gt;If you can cache it then do it. Common lists (Treeview data, Combo Box Selections etc... ). If it doesn&#039;t change that often then Cache it on first retrieval (Or lazy load) then use that cache. DB round trips are slow, so if you can stick it away in memory somewhere then do it.&lt;/p&gt;
&lt;p&gt;Thats my 2 cents worth anyway.&lt;/p&gt;
</description>
 <pubDate>Wed, 23 Aug 2006 00:55:41 -0700</pubDate>
 <dc:creator>Terry Cornwell</dc:creator>
 <guid isPermaLink="false">comment 1427 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>But do they?</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1307</link>
 <description>&lt;p&gt;I understand where you are coming from on this, but do you include columns such as &#039;DateCreated&#039; and &#039;LastModified&#039; in your business DTO&#039;s?&lt;/p&gt;
&lt;p&gt;Chris Gaskell, .NET &amp;amp; Web development Enthusiast&lt;/p&gt;
</description>
 <pubDate>Thu, 27 Jul 2006 02:34:20 -0700</pubDate>
 <dc:creator>Chris Gaskell</dc:creator>
 <guid isPermaLink="false">comment 1307 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Apologies</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1306</link>
 <description>&lt;p&gt;It seems my definition of a dynamic SQL query hasn&#039;t come across as I intended. Please see my example of a dynamic query below (I think you will find this matches your descripiton of a static query)&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;sql = @&quot;SELECT Col1, Col2 FROM table WHERE id=&quot; + id;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Chris Gaskell, .NET &amp;amp; Web development Enthusiast&lt;/p&gt;
</description>
 <pubDate>Thu, 27 Jul 2006 02:31:59 -0700</pubDate>
 <dc:creator>Chris Gaskell</dc:creator>
 <guid isPermaLink="false">comment 1306 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Limit numbers of SQL Queries</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1305</link>
 <description>&lt;p&gt;Great list - I would add the following to it:&lt;/p&gt;
&lt;p&gt;Create a limited number of SQL queries and store them in a common file, rather than letting them appear all over your code.&lt;/p&gt;
&lt;p&gt;You might want to change your database later. This can cause problems if you are trying to find everything that may be affected by a change in your schema. If you store every SQL query in a common file, and limit the numbers of these, there will be less to change and less risk of your missing something important.&lt;/p&gt;
</description>
 <pubDate>Thu, 27 Jul 2006 01:11:07 -0700</pubDate>
 <dc:creator>Richard Jonas</dc:creator>
 <guid isPermaLink="false">comment 1305 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Problem with Best Practice #7</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1304</link>
 <description>&lt;p&gt;Dynamic SQL queries implemented as parameterized commands improve performance (supposedly better than a stored procedure, but there is some of debate about that) and reduce the chance SQL injection attack (because it is parameterized) while also making your code much more easier to maintain (when done through an OR-Mapper or like technique).  It is the static SQL queries (tends to be very common) that suffer these kinds of problems.&lt;/p&gt;
</description>
 <pubDate>Wed, 26 Jul 2006 16:40:28 -0700</pubDate>
 <dc:creator>David Parslow</dc:creator>
 <guid isPermaLink="false">comment 1304 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Best Practice #10</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1303</link>
 <description>&lt;p&gt;To answer &quot;and how often do you actually use all the columns?&quot;&lt;br /&gt;
I would say those who uses Business Objects with a N Tier Model selects all the columns and fills the Business Object a lot.&lt;/p&gt;
</description>
 <pubDate>Wed, 26 Jul 2006 16:37:38 -0700</pubDate>
 <dc:creator>Shahed Khan</dc:creator>
 <guid isPermaLink="false">comment 1303 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Best Practice #6</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1302</link>
 <description>&lt;blockquote&gt;&lt;p&gt; The close method of the DataReader class continues to read all remaining rows before it finally&lt;br /&gt;
closes the object.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Are you sure? I thought reading was done only with the Read() method.&lt;/p&gt;
</description>
 <pubDate>Wed, 26 Jul 2006 07:45:03 -0700</pubDate>
 <dc:creator>Michel</dc:creator>
 <guid isPermaLink="false">comment 1302 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>A Nice Collection</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1295</link>
 <description>&lt;p&gt;I like these tips, and also agree with Phil&#039;s vote for the &lt;b&gt;using&lt;/b&gt; block statement. A nice invention, that.&lt;/p&gt;
&lt;p&gt;I especially like your #3, but would vote in favor of generalizing it a bit: let the database do what the database is good at.&lt;/p&gt;
&lt;p&gt;Thanks for posting! Hope to see more, Chris.&lt;/p&gt;
&lt;p&gt;Best,&lt;br /&gt;
Dan&lt;/p&gt;
</description>
 <pubDate>Tue, 25 Jul 2006 16:06:47 -0700</pubDate>
 <dc:creator>Daniel Read</dc:creator>
 <guid isPermaLink="false">comment 1295 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Best Practices</title>
 <link>http://www.developerdotstar.com/community/node/531#comment-1293</link>
 <description>&lt;p&gt;With regard number 5, I&#039;d go one step further.&lt;/p&gt;
&lt;p&gt;Ensure you utilise the using statments.&lt;/p&gt;
&lt;p&gt;Using Conn As New SqlConnection()&lt;/p&gt;
&lt;p&gt;using (SqlConnection Conn = new SqlConnection())&lt;/p&gt;
&lt;p&gt;This will ensure the cleanup of all resources.&lt;/p&gt;
</description>
 <pubDate>Tue, 25 Jul 2006 13:41:34 -0700</pubDate>
 <dc:creator>Phil</dc:creator>
 <guid isPermaLink="false">comment 1293 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Using Data with ASP.Net - 10 of my &#039;Best Practices&#039;</title>
 <link>http://www.developerdotstar.com/community/node/531</link>
 <description>&lt;p&gt;It can hardly be said that any serious programmer has had to deal with database programming at least some time in their careers. So it would be logical then to make sure your code to these underlying databases are as efficient as possible. Hopefully I will share some of the best practices I have learned in dealing with ADO.Net programming.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.developerdotstar.com/community/node/531&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.developerdotstar.com/community/node/531#comment</comments>
 <category domain="http://www.developerdotstar.com/community/taxonomy/term/16">.NET</category>
 <category domain="http://www.developerdotstar.com/community/taxonomy/term/27">Database Performance</category>
 <category domain="http://www.developerdotstar.com/community/taxonomy/term/25">Databases General</category>
 <category domain="http://www.developerdotstar.com/community/taxonomy/term/35">Process and Methodology</category>
 <pubDate>Mon, 24 Jul 2006 01:16:19 -0700</pubDate>
 <dc:creator>Chris Gaskell</dc:creator>
 <guid isPermaLink="false">531 at http://www.developerdotstar.com/community</guid>
</item>
</channel>
</rss>
