<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel xmlns:blog="http://www.dotnetnuke.com/blog/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <title>The Pants Are Off</title>
    <description>Information about DNN, ASP.NET, SQL and the projects CodeMyPants is working on.</description>
    <link>http://www.codemypantsoff.com/Blog/tabid/83/BlogId/1/Default.aspx</link>
    <language>en-US</language>
    <webMaster>dylan.barber@codemypantsoff.com</webMaster>
    <pubDate>Wed, 22 Feb 2012 19:08:07 GMT</pubDate>
    <lastBuildDate>Wed, 22 Feb 2012 19:08:07 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 4.1.0.0</generator>
    <item>
      <title>The Real Cost of Falling Behind</title>
      <link>http://codemypantsoff.com/Blog/tabid/83/EntryId/61/The-Real-Cost-of-Falling-Behind.aspx</link>
      <description>Lately I have been helping some users upgrade DNN sites from older versions, some all the way back to 3.x. If they had kept up with the DNN upgrades and advancements in .NET some may have saved themselves some cash.&lt;div class="tags"&gt;Tags: upgrade&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx&gt;DotNetNuke&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx">DotNetNuke</category>
      <comments>http://codemypantsoff.com/Blog/tabid/83/EntryId/61/The-Real-Cost-of-Falling-Behind.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Blog/tabid/83/EntryId/61/The-Real-Cost-of-Falling-Behind.aspx</guid>
      <pubDate>Mon, 05 Dec 2011 09:20:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=61</trackback:ping>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/11/Default.aspx">upgrade</blog:tag>
    </item>
    <item>
      <title>DotNetNuke Christmas Wishlist</title>
      <link>http://codemypantsoff.com/Blog/tabid/83/EntryId/60/DotNetNuke-Christmas-Wishlist.aspx</link>
      <description>Christmas is right around the corner and it is time to to make sure that Christmas wish list to Santa is ready to send, if not already on its way. Here is my list to Santa for DotNetNuke.&lt;div class="tags"&gt;Tags: SEO,DotNetNuke,modules&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx&gt;DotNetNuke&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/15/Default.aspx&gt;Other Interesting Things&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx">DotNetNuke</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/15/Default.aspx">Other Interesting Things</category>
      <comments>http://codemypantsoff.com/Blog/tabid/83/EntryId/60/DotNetNuke-Christmas-Wishlist.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Blog/tabid/83/EntryId/60/DotNetNuke-Christmas-Wishlist.aspx</guid>
      <pubDate>Sun, 27 Nov 2011 18:12:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=60</trackback:ping>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/6/Default.aspx">SEO</blog:tag>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/9/Default.aspx">DotNetNuke</blog:tag>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/10/Default.aspx">modules</blog:tag>
    </item>
    <item>
      <title>SEO with the Core DNN Blog</title>
      <link>http://codemypantsoff.com/Blog/tabid/83/EntryId/59/SEO-with-the-Core-DNN-Blog.aspx</link>
      <description>SEO is a vital part of a successful site, especially if you offer a service or sell anything on your site. Sometimes the SEO abilities of the core blog are a little lacking. Here is one way to help control the permalink URL for blog items.&lt;div class="tags"&gt;Tags: blog,SEO,SQL,DNN Hack&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx&gt;DotNetNuke&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/12/Default.aspx&gt;SQL&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/13/Default.aspx&gt;ASP.NET&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx">DotNetNuke</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/12/Default.aspx">SQL</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/13/Default.aspx">ASP.NET</category>
      <comments>http://codemypantsoff.com/Blog/tabid/83/EntryId/59/SEO-with-the-Core-DNN-Blog.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Blog/tabid/83/EntryId/59/SEO-with-the-Core-DNN-Blog.aspx</guid>
      <pubDate>Thu, 24 Nov 2011 16:07:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=59</trackback:ping>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/5/Default.aspx">blog</blog:tag>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/6/Default.aspx">SEO</blog:tag>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/7/Default.aspx">SQL</blog:tag>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/8/Default.aspx">DNN Hack</blog:tag>
    </item>
    <item>
      <title>Why should I pick DotNetNuke (or any other Content Management System)?</title>
      <link>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/56/Why-should-I-pick-DotNetNuke-or-any-other-Content-Management-System.aspx</link>
      <description>&lt;p style="margin: 0in 0in 10pt;"&gt;Twitter, LinkedIn, various blogs and social media all have flame wars, discussions, analysis and reasons why each CMS is the best or why such and such developer will not or cannot use another CMS. Frankly these discussions and arguments are a bit on the pedantic side. As the old saying goes ‘Opinions are like &lt;i&gt;&lt;span style="text-decoration: underline;"&gt;insert expletive here&lt;/span&gt;&lt;/i&gt; everyone has one’. &lt;/p&gt;
&lt;p style="margin: 0in 0in 10pt;"&gt;The reality of the situation is that developers get both comfortable and lazy. (Before emailing me with a flame about how wrong I am let me explain.) Developers love to reuse things code/screens/ideas, it’s in our nature and it’s in our training. There are people who spend years thinking up patterns to make developers more productive by stamping out like pieces of programs. We spend years trying to refactor code so that one piece of code can be used over and over. Developers also like to work within their favorite language/IDE/operating system/insert computer term here. It makes up prejudiced towards other systems and ideas.&lt;/p&gt;
&lt;p style="margin: 0in 0in 10pt;"&gt;So if trying to evaluate a CMS what is a web site owner to do? I can’t tell you any rules that will lead you blindly to the right fit but here are some guidelines, hopefully they are common sense.&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Start with the goals of your site. Is your site a blog? Is your site for a portfolio? Is your site set up for e-commerce? Knowing what you need and want to accomplish will lead you to the right solution. For example I personally love DNN, I have spent years studying and using it. I know ASP.NET and Microsoft IIS. So if you come to me I might say off the top of my head “Let’s use DNN”. However, DNN may be overkill for a simple hobby blog; Wordpress may be a more correct sized decision.&lt;br /&gt;&lt;a href=http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/56/Why-should-I-pick-DotNetNuke-or-any-other-Content-Management-System.aspx&gt;More ...&lt;/a&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <comments>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/56/Why-should-I-pick-DotNetNuke-or-any-other-Content-Management-System.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/56/Why-should-I-pick-DotNetNuke-or-any-other-Content-Management-System.aspx</guid>
      <pubDate>Fri, 07 Oct 2011 14:08:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=56</trackback:ping>
    </item>
    <item>
      <title>Simple DNN Upgrade Checklist</title>
      <link>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/55/Simple-DNN-Upgrade-Checklist.aspx</link>
      <description>With the release of DNN 6 have been seeing a fair amount of requests for upgrades. Thought just to help out I would put together a simple upgrade checklist. &lt;br /&gt;
&lt;br /&gt;
Thanks to Will Strohl (&lt;a href="http://twitter.com/#%21/WillStrohl" target="_blank"&gt;@willstrohl&lt;/a&gt;) for his suggested upgrade path (&lt;a href="http://www.willstrohl.com/Blog/EntryId/102/Suggested-DotNetNuke-Site-Upgrade-Path-s" target="_blank"&gt;http://www.willstrohl.com/Blog/EntryId/102/Suggested-DotNetNuke-Site-Upgrade-Path-s&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: 16px;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;a href="http://codemypantsoff.com/Portals/codemypantsoff/DNN%20Upgrade%20Checklist.docx"&gt;&lt;span style="font-size: 16px;"&gt;&lt;strong&gt;Check List Download &lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/55/Simple-DNN-Upgrade-Checklist.aspx&gt;More ...&lt;/a&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx&gt;DotNetNuke&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx">DotNetNuke</category>
      <comments>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/55/Simple-DNN-Upgrade-Checklist.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/55/Simple-DNN-Upgrade-Checklist.aspx</guid>
      <pubDate>Fri, 23 Sep 2011 06:43:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=55</trackback:ping>
    </item>
    <item>
      <title>Using Table Value Parameters (TVP) in the DNN Data Provider</title>
      <link>http://codemypantsoff.com/Blog/tabid/83/EntryId/54/Using-Table-Value-Parameters-TVP-in-the-DNN-Data-Provider.aspx</link>
      <description>&lt;p&gt;I have been working on a new web application and recently ran into an interesting situation where I wanted to add possibly hundreds of records from one data entry screen. In the past I have done this a few different ways:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Loop through set of data and add each row one by one. &lt;/li&gt;
    &lt;li&gt;Create some delimited string and create some SQL to parse it into a temp table.  &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Both of those methods work but have serious drawbacks.&lt;br /&gt;
&lt;br /&gt;
Method one is very easy to program but all those insert statements cause a lot of traffic to and from the database, this can cause a lot of scaling issues. Method two works if you are only inserting one value at a time and that value is not complex like lots of text or image byte arrays.&lt;br /&gt;
&lt;br /&gt;
A much easier method of doing this would be to create a table fill it with data and simply use a insert statement to select all records from the table into our datatable. Now with SQL 2008 we can pass Table Valued Parameters (TVP) to a stored procedure and use it just like any other table in the database.&lt;br /&gt;
&lt;br /&gt;
Here's how: (VB code)&lt;br /&gt;
&lt;br /&gt;
1. Create your datatable in code. (I make no claims this is the best way to make a datatable in code and in fact would love input here to make this more efficient)&lt;/p&gt;
&lt;div style="overflow-y: auto; border: 1px solid #7f9db9;" class="reCodeBlock"&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;1.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;Dim&lt;/code&gt; &lt;code style="color: #000000;"&gt;myTable &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;New&lt;/code&gt; &lt;code style="color: #000000;"&gt;DataTable &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;2.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;Dim&lt;/code&gt; &lt;code style="color: #000000;"&gt;col1 &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;New&lt;/code&gt; &lt;code style="color: #000000;"&gt;DataColumn(&lt;/code&gt;&lt;code style="color: blue;"&gt;"Col1"&lt;/code&gt;&lt;code style="color: #000000;"&gt;, System.Type.&lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;GetType&lt;/code&gt;&lt;code style="color: #000000;"&gt;(&lt;/code&gt;&lt;code style="color: blue;"&gt;"System.Int32"&lt;/code&gt;&lt;code style="color: #000000;"&gt;)) &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;3.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;Dim&lt;/code&gt; &lt;code style="color: #000000;"&gt;col2 &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;New&lt;/code&gt; &lt;code style="color: #000000;"&gt;DataColumn(&lt;/code&gt;&lt;code style="color: blue;"&gt;"Col2"&lt;/code&gt;&lt;code style="color: #000000;"&gt;, System.Type.&lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;GetType&lt;/code&gt;&lt;code style="color: #000000;"&gt;(&lt;/code&gt;&lt;code style="color: blue;"&gt;"System.Int32"&lt;/code&gt;&lt;code style="color: #000000;"&gt;)) &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;4.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;myTable.Columns.Add(col1) &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;5.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;myTable.Columns.Add(col2)&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
2. Fill the datatable with data. (in this case I am adding one row of data. You would loop or fill this datatable however is needed for your application.)&lt;br /&gt;
&lt;div style="overflow-y: auto; border: 1px solid #7f9db9;" class="reCodeBlock"&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;1.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;Dim&lt;/code&gt; &lt;code style="color: #000000;"&gt;vals(1) &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;Object&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;2.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;vals(0) = &lt;/code&gt;&lt;code style="color: #008200;"&gt;'integer value' &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;3.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;vals(1) = &lt;/code&gt;&lt;code style="color: #008200;"&gt;'integer value' &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;4.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;myTable.Rows.Add(vals)&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
3. Pass the datatable to your Controller and on to the Data Provider through to the SQL Data Provider. (I wont show those steps as they are standard calls.)&lt;br /&gt;
&lt;br /&gt;
4. When calling the SQLHelper in the SQL Data Provider you will need to use the overload that asks for the command type and extra parameter array as SQL parameters.&lt;br /&gt;
&lt;div style="overflow-y: auto; border: 1px solid #7f9db9;" class="reCodeBlock"&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;Public&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;Shared&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;Function&lt;/code&gt; &lt;code style="color: #000000;"&gt;ExecuteNonQuery(&lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;ByVal&lt;/code&gt; &lt;code style="color: #000000;"&gt;connectionString &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;String&lt;/code&gt;&lt;code style="color: #000000;"&gt;, &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;ByVal&lt;/code&gt; &lt;code style="color: #000000;"&gt;commandType &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #000000;"&gt;System.Data.CommandType, &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;ByVal&lt;/code&gt; &lt;code style="color: #000000;"&gt;commandText &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;String&lt;/code&gt;&lt;code style="color: #000000;"&gt;, &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;ByVal&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;ParamArray&lt;/code&gt; &lt;code style="color: #000000;"&gt;commandParameters() &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #000000;"&gt;System.Data.SqlClient.SqlParameter) &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;Integer&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;span&gt;&lt;code&gt; &lt;/code&gt;&lt;span style="margin-left: 3px ! important;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;Member of Microsoft.ApplicationBlocks.Data.SqlHelper&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
So the call for the example I have above may look like:&lt;br /&gt;
&lt;div style="overflow-y: auto; border: 1px solid #7f9db9;" class="reCodeBlock"&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;1.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;Public&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;Overrides&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;Sub&lt;/code&gt; &lt;code style="color: #000000;"&gt;Department_AddUsers2Department(&lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;ByVal&lt;/code&gt; &lt;code style="color: #000000;"&gt;CompleteTable &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #000000;"&gt;System.Data.DataTable) &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;2.&lt;/code&gt;&lt;span&gt;&lt;code&gt;            &lt;/code&gt;&lt;span style="margin-left: 36px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;Dim&lt;/code&gt; &lt;code style="color: #000000;"&gt;myParam1 &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;As&lt;/code&gt; &lt;code style="color: #000000;"&gt;SqlParameter = &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;New&lt;/code&gt; &lt;code style="color: #000000;"&gt;SqlParameter(&lt;/code&gt;&lt;code style="color: blue;"&gt;"@MyTable"&lt;/code&gt;&lt;code style="color: #000000;"&gt;, SqlDbType.Structured) &lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;3.&lt;/code&gt;&lt;span&gt;&lt;code&gt;            &lt;/code&gt;&lt;span style="margin-left: 36px ! important;"&gt;&lt;code style="color: #000000;"&gt;myParam1.Value = CompleteTable &lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;4.&lt;/code&gt;&lt;span&gt;&lt;code&gt;            &lt;/code&gt;&lt;span style="margin-left: 36px ! important;"&gt;&lt;code style="color: #000000;"&gt;SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, &lt;/code&gt;&lt;code style="color: blue;"&gt;"Example_StoredProc"&lt;/code&gt;&lt;code style="color: #000000;"&gt;, myParam1) &lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;5.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;End&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;Sub&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
If you have other parameters you are passing in you will have to define those as specific parameters.&lt;br /&gt;
&lt;br /&gt;
5. In the database create a User-Defined Table Type to match the table being passed into the stored procedure. (This is one area that I feel will be a maintenance nightmare if not well planned.)&lt;br /&gt;
&lt;div style="overflow-y: auto; border: 1px solid #7f9db9;" class="reCodeBlock"&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;1.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;CREATE&lt;/code&gt; &lt;code style="color: #000000;"&gt;TYPE [dbo].[tvp_ExampleTable] &lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;AS&lt;/code&gt; &lt;code style="color: #006699; font-weight: bold;"&gt;TABLE&lt;/code&gt;&lt;code style="color: #000000;"&gt;( &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;2.&lt;/code&gt;&lt;span&gt;&lt;code&gt;    &lt;/code&gt;&lt;span style="margin-left: 12px ! important;"&gt;&lt;code style="color: #000000;"&gt;[Col1] [&lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;int&lt;/code&gt;&lt;code style="color: #000000;"&gt;] &lt;/code&gt;&lt;code style="color: #808080;"&gt;NOT&lt;/code&gt; &lt;code style="color: #808080;"&gt;NULL&lt;/code&gt;&lt;code style="color: #000000;"&gt;, &lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;3.&lt;/code&gt;&lt;span&gt;&lt;code&gt;    &lt;/code&gt;&lt;span style="margin-left: 12px ! important;"&gt;&lt;code style="color: #000000;"&gt;[Col2] [&lt;/code&gt;&lt;code style="color: #006699; font-weight: bold;"&gt;int&lt;/code&gt;&lt;code style="color: #000000;"&gt;] &lt;/code&gt;&lt;code style="color: #808080;"&gt;NOT&lt;/code&gt; &lt;code style="color: #808080;"&gt;NULL&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #f8f8f8;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;4.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;) &lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;5.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;GO&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
Now in the stored procedure define a parameter that is the table type. (Notice the READONLY qualifier after the table parameter. This is required because a copy of the user-defined table variable is not passed to the procedure. To be more efficient, a pointer is passed to the proc. Therefore, to eliminate changes to the variable inside the proc that would affect the original, no changes are allowed.)&lt;br /&gt;
&lt;br /&gt;
&lt;div style="overflow-y: auto; border: 1px solid #7f9db9;" class="reCodeBlock"&gt;
&lt;div style="background-color: #ffffff;"&gt;&lt;code style="text-align: right; width: 3em; padding-right: 0.3em; display: block; float: left; color: #5c5c5c;"&gt;1.&lt;/code&gt;&lt;span style="margin-left: 0px ! important;"&gt;&lt;code style="color: #000000;"&gt;@MyTable tvp_ExampleTable READONLY&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
From here just use the parameter as you would any other table.&lt;br /&gt;&lt;a href=http://codemypantsoff.com/Blog/tabid/83/EntryId/54/Using-Table-Value-Parameters-TVP-in-the-DNN-Data-Provider.aspx&gt;More ...&lt;/a&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx&gt;DotNetNuke&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/12/Default.aspx&gt;SQL&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/13/Default.aspx&gt;ASP.NET&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/14/Default.aspx&gt;Projects&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx">DotNetNuke</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/12/Default.aspx">SQL</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/13/Default.aspx">ASP.NET</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/14/Default.aspx">Projects</category>
      <comments>http://codemypantsoff.com/Blog/tabid/83/EntryId/54/Using-Table-Value-Parameters-TVP-in-the-DNN-Data-Provider.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Blog/tabid/83/EntryId/54/Using-Table-Value-Parameters-TVP-in-the-DNN-Data-Provider.aspx</guid>
      <pubDate>Tue, 23 Aug 2011 20:29:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=54</trackback:ping>
    </item>
    <item>
      <title>Building a web application</title>
      <link>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/53/Building-a-web-application.aspx</link>
      <description>&lt;p&gt;The next few months will be hectic as I reach into every trick I can to start building what I consider my masterpiece. Built on DNN and Telerik controls hopefully this will become a standard.&lt;/p&gt;
&lt;br&gt;
&lt;iframe src="http://www.indiegogo.com/project/widget/39261?a=229315" width="210px" height="400px" frameborder="1" scrolling="no"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;a href=http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/53/Building-a-web-application.aspx&gt;More ...&lt;/a&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx&gt;DotNetNuke&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/14/Default.aspx&gt;Projects&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/15/Default.aspx&gt;Other Interesting Things&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx">DotNetNuke</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/14/Default.aspx">Projects</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/15/Default.aspx">Other Interesting Things</category>
      <comments>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/53/Building-a-web-application.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/53/Building-a-web-application.aspx</guid>
      <pubDate>Sun, 21 Aug 2011 08:56:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=53</trackback:ping>
    </item>
    <item>
      <title>Password Strength - Great Graphic</title>
      <link>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/57/Password-Strength-Great-Graphic.aspx</link>
      <description>&lt;img width="600" alt="" src="http://imgs.xkcd.com/comics/password_strength.png" /&gt; &lt;br /&gt;
&lt;p&gt;From http://xkcd.com/936/&lt;/p&gt;&lt;br /&gt;&lt;a href=http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/57/Password-Strength-Great-Graphic.aspx&gt;More ...&lt;/a&gt;&lt;div class="tags"&gt;Tags: password&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/15/Default.aspx&gt;Other Interesting Things&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/15/Default.aspx">Other Interesting Things</category>
      <comments>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/57/Password-Strength-Great-Graphic.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/57/Password-Strength-Great-Graphic.aspx</guid>
      <pubDate>Wed, 10 Aug 2011 04:43:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=57</trackback:ping>
      <blog:tag blog:url="http://www.codemypantsoff.com/Blog/tabid/83/TagID/4/Default.aspx">password</blog:tag>
    </item>
    <item>
      <title>Why not use Flash?</title>
      <link>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/52/Why-not-use-Flash.aspx</link>
      <description>&lt;p&gt;One would think that by now, articles on this subject would be common but yet again and again I get asked, 'Can you build a Flash site for me?'. I still see sites that are a) built in flash and / or b) have image-heavy design, which is super irritating. Not to point fingers, but I've found that the most these sites tend to be for design agencies (showing off their skills) and for some reason bars and restaurants. There are millions of reasons why sites built in flash or image heavy are bad, here are my top 7.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Top 7 Reasons to build a text-based site&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;20% of the users disable Flash plug-ins, these movies takes forever to download (and so does the plug-in that plays it). &lt;/li&gt;
    &lt;li&gt;Users are more-and-more moving towards mobile devices to visit website (the iPhone cannot read flash - and most likely never will) &lt;/li&gt;
    &lt;li&gt;Many large corporations block installing flash on browsers. &lt;/li&gt;
    &lt;li&gt;Journalists and members of the trade cannot easily copy information about your business if it's image-based or in flash, and they don't have the time and patience to retype the info (and will likely move onto the next company). &lt;/li&gt;
    &lt;li&gt;Design and implementation costs are far higher for flash and images than for a simple, clean site. &lt;/li&gt;
    &lt;li&gt;Search engines cannot read graphics and you will not be recognized by them. &lt;/li&gt;
    &lt;li&gt;Sites built in flash often confuse the user as the navigation is typically unintuitive. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I'm not saying you can't incorporate cool design and animation into your site, just be careful that the content and usability doesn't get lost.&lt;/p&gt;&lt;br /&gt;&lt;a href=http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/52/Why-not-use-Flash.aspx&gt;More ...&lt;/a&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/13/Default.aspx&gt;ASP.NET&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/15/Default.aspx&gt;Other Interesting Things&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/13/Default.aspx">ASP.NET</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/15/Default.aspx">Other Interesting Things</category>
      <comments>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/52/Why-not-use-Flash.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/52/Why-not-use-Flash.aspx</guid>
      <pubDate>Wed, 03 Aug 2011 12:10:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=52</trackback:ping>
    </item>
    <item>
      <title>Make all users update password on next log in.</title>
      <link>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/51/Make-all-users-update-password-on-next-log-in.aspx</link>
      <description>This question came from Twitter but thought it was a good quick fix here is a step by step on doing just that.&lt;br /&gt;
&lt;ol&gt;
    &lt;li&gt;Log in a host account &lt;/li&gt;
    &lt;li&gt;Navigate to the SQL module under the Host menu &lt;/li&gt;
    &lt;li&gt;Run the following script
    &lt;p&gt;UPDATE Users set UpdatePassword = 1 WHERE UserID in (SELECT UserID from UserPortals WHERE PortalId = X)&lt;/p&gt;
    --replace x with the id of the portal &lt;/li&gt;
    &lt;li&gt;Select 'Run as script' check box &lt;/li&gt;
    &lt;li&gt;Click Execute &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Of course this script assumes you know what portal you are running this against, and that there is no object qualifier for the DNN database.&lt;/p&gt;&lt;br /&gt;&lt;a href=http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/51/Make-all-users-update-password-on-next-log-in.aspx&gt;More ...&lt;/a&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx&gt;DotNetNuke&lt;/a&gt;&lt;/div&gt;&lt;div class="category"&gt;Category: &lt;a href=http://www.codemypantsoff.com/Blog/tabid/83/CatID/12/Default.aspx&gt;SQL&lt;/a&gt;&lt;/div&gt;</description>
      <author>dylan.barber@codemypantsoff.com</author>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/11/Default.aspx">DotNetNuke</category>
      <category domain="http://www.codemypantsoff.com/Blog/tabid/83/CatID/12/Default.aspx">SQL</category>
      <comments>http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/51/Make-all-users-update-password-on-next-log-in.aspx#Comments</comments>
      <slash:comments>0</slash:comments>
      <guid isPermaLink="true">http://codemypantsoff.com/Admin/Taxonomy/tabid/133/EntryId/51/Make-all-users-update-password-on-next-log-in.aspx</guid>
      <pubDate>Fri, 17 Jun 2011 02:15:00 GMT</pubDate>
      <trackback:ping>http://www.codemypantsoff.comDesktopModules/BlogTrackback.aspx?id=51</trackback:ping>
    </item>
  </channel>
</rss>
