<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Head.SmackOnTable(); &#187; asp.net</title>
	<atom:link href="http://www.unauthorised-access.com/tag/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unauthorised-access.com</link>
	<description>Contains Nuts.</description>
	<lastBuildDate>Fri, 02 Jul 2010 17:46:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Making code easier to maintain, read</title>
		<link>http://www.unauthorised-access.com/2010/05/making-code-easier-to-maintain-read/</link>
		<comments>http://www.unauthorised-access.com/2010/05/making-code-easier-to-maintain-read/#comments</comments>
		<pubDate>Fri, 07 May 2010 15:05:58 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Cleverectomy]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=442</guid>
		<description><![CDATA[Often, when working with someone else&#8217;s code, it works, but it isnt easy to maintain and read. Basically its ugly, and sometimes its like an ugly bag of snakes. Take this example: Note: This code has been changed to protect the guilty. [HandleError] public ActionResult LogOn(string username, string password, bool rememberMe) { string failureText = [...]]]></description>
			<content:encoded><![CDATA[<p>Often, when working with someone else&#8217;s code, it works, but it isnt easy to maintain and read. Basically its ugly, and sometimes its like an ugly bag of snakes. Take this example:</p>
<p><strong>Note: This code has been changed to protect the guilty.</strong></p>
<pre class="brush: csharp;">
[HandleError]
 public ActionResult LogOn(string username, string password, bool rememberMe)
 {
 string failureText = _websiteService.Login(username, password, rememberMe);
 if (!string.IsNullOrEmpty(failureText))
 {
 TempData[&quot;LoginFailure&quot;] = failureText;
 return RedirectToAction(&quot;CheckoutAddress&quot;);
 }
 else
 Response.Redirect(Url.Action(&quot;CheckoutAddress&quot;, &quot;Orders&quot;));

 return View();
 }
</pre>
<p>Now, to me, this rings alarm bells, for multiple reasons. First off, you have failureText which claims to login, but actually gets you if it failed or not. Next thing you have is the &#8220;If there is no failure text, then it has worked&#8221;. Thirdly, you have the defunct return view, even though it shouldnt really be there.</p>
<p>How should this code be structured I hear you cry? Well, something like this:</p>
<pre class="brush: csharp;">
[HandleError]
public ActionResult LogOn(string username, string password, bool rememberMe)
{
 if (AreCredentialsValid(username, password) &amp;&amp; IsUserAllowedToLogin(username))
 {
 SetAuthenticationCookie(username,password);
 return RedirectToAction(&quot;CheckoutAddress&quot;);
 }
 else
 {
 ShowInvalidCredentialsPanel();
 return RedirectToAction(&quot;CheckoutAddress&quot;);
 }
}
</pre>
<p>Much more easier to read, much easier to maintain and modify, and no having to look for magic strings and just assuming someone can login because there wasnt an error.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2010/05/making-code-easier-to-maintain-read/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CycleMania&#8217;s Continuous Integration</title>
		<link>http://www.unauthorised-access.com/2009/12/cyclemanias-continuous-integration/</link>
		<comments>http://www.unauthorised-access.com/2009/12/cyclemanias-continuous-integration/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 14:37:48 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[CycleMania]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=349</guid>
		<description><![CDATA[Its now public knowledge that I have been working on getting a decent CI integration for the CycleMania project working on a publicly accessable server. For the record, we are using the following tech for the CI integration. Yes, I WILL write a very detailed how-to on how I set things up, but as I [...]]]></description>
			<content:encoded><![CDATA[<p>Its now <a href="http://twitter.com/LeeDumond/status/6767942229">public knowledge</a> that I have been working on getting a decent CI integration for the <a href="http://cyclemania.codeplex.com/">CycleMania project</a> working on a publicly accessable server.</p>
<p>For the record, we are using the following tech for the CI integration. Yes, I WILL write a very detailed how-to on how I set things up, but as I am on my lunchbreak here at work, heres a very quick overview of what we are using:</p>
<ul>
<li>TeamCity 5.0 Professional, a free download from JetBrains (Limit of 20 Projects and 20 Users)</li>
<li>.Net framework 4.0 Beta 2 (obviously)</li>
<li>Nant 0.85, not as a proper build script, but purely as a glorified as a batch script</li>
<li>APPCMD command to control IIS7&#8242;s App recycling (From inside Nant)</li>
<li>.Net 4.0&#8242;s MSBuild</li>
</ul>
<p>All this running ontop of Windows 2008 R2 Web Edition, and SQL Server 2008 Express.</p>
<p>Things I have learned is:</p>
<ul>
<li>TeamCity 5.0 isnt geared up for .net 4.0 YET, which is fair enough, they said support will be included in 5.1</li>
<li>TeamCity also seems to be simply geared for building projects and running unit tests, less so for copying files over to another directory with specific paths etc.</li>
<li>Nant&#8217;s contrib project is crap. Fair enough last time it was updated was 3 years ago, but it dosent work.</li>
<li>You cannot simply recycle an app pool to kill a user instance of SQL Server 2008, to update the .mdf file.</li>
<li>You really shouldnt run a site from the same directory as SVN, if you plan to update it (re above)</li>
<li>Nant is all good and well, but also dosent support .net 4.0.</li>
</ul>
<p>I promise I will expand on most of these points when I have time!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/12/cyclemanias-continuous-integration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LAB: Image Detection, Part 3</title>
		<link>http://www.unauthorised-access.com/2009/05/lab-image-detection-part-3/</link>
		<comments>http://www.unauthorised-access.com/2009/05/lab-image-detection-part-3/#comments</comments>
		<pubDate>Fri, 08 May 2009 00:19:47 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[R&D Lab]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[R&D]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=263</guid>
		<description><![CDATA[After writing some comparison code, we have the following output, thanks to log4net (I love log4net): Source Target . X:79 Y:156 W:17 H:23 X:73 Y:149 W:17 H:23 . X:337 Y:176 W:27 H:50 X:331 Y:169 W:27 H:49 . X:158 Y:249 W:32 H:31 X:152 Y:242 W:32 H:32 . X:446 Y:286 W:28 H:32 X:440 Y:279 W:27 H:32 . [...]]]></description>
			<content:encoded><![CDATA[<p>After writing some comparison code, we have the following output, thanks to log4net (I love log4net):</p>
<p><a href="http://www.unauthorised-access.com/wp-content/uploads/2009/05/output-3.jpg"><img class="alignnone size-thumbnail wp-image-265" title="output-3" src="http://www.unauthorised-access.com/wp-content/uploads/2009/05/output-3-150x150.jpg" alt="output-3" width="150" height="150" /></a></p>
<table id="tblMain_0" class="tblGenFixed" style="height: 220px;" border="0" cellspacing="0" cellpadding="0" width="493">
<tbody>
<tr>
<td class="s0"><cite><strong>Source</strong></cite></td>
<td class="s1"><cite><br />
</cite></td>
<td class="s1"><cite><br />
</cite></td>
<td class="s1"><cite><br />
</cite></td>
<td class="s2"><cite></cite></td>
<td class="s1"><cite><strong>Target</strong></cite></td>
<td class="s1"><cite><br />
</cite></td>
<td class="s1"><cite><br />
</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:79</cite></td>
<td class="s4"><cite>Y:156</cite></td>
<td class="s4"><cite>W:17</cite></td>
<td class="s4"><cite>H:23</cite></td>
<td class="s4"><cite>X:73</cite></td>
<td class="s4"><cite>Y:149</cite></td>
<td class="s4"><cite>W:17</cite></td>
<td class="s4"><cite>H:23</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:337</cite></td>
<td class="s4"><cite>Y:176</cite></td>
<td class="s4"><cite>W:27</cite></td>
<td class="s4"><cite>H:50</cite></td>
<td class="s4"><cite>X:331</cite></td>
<td class="s4"><cite>Y:169</cite></td>
<td class="s4"><cite>W:27</cite></td>
<td class="s4"><cite>H:49</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:158</cite></td>
<td class="s4"><cite>Y:249</cite></td>
<td class="s4"><cite>W:32</cite></td>
<td class="s4"><cite>H:31</cite></td>
<td class="s4"><cite>X:152</cite></td>
<td class="s4"><cite>Y:242</cite></td>
<td class="s4"><cite>W:32</cite></td>
<td class="s4"><cite>H:32</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:446</cite></td>
<td class="s4"><cite>Y:286</cite></td>
<td class="s4"><cite>W:28</cite></td>
<td class="s4"><cite>H:32</cite></td>
<td class="s4"><cite>X:440</cite></td>
<td class="s4"><cite>Y:279</cite></td>
<td class="s4"><cite>W:27</cite></td>
<td class="s4"><cite>H:32</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:398</cite></td>
<td class="s4"><cite>Y:339</cite></td>
<td class="s4"><cite>W:18</cite></td>
<td class="s4"><cite>H:26</cite></td>
<td class="s4"><cite>X:392</cite></td>
<td class="s4"><cite>Y:334</cite></td>
<td class="s4"><cite>W:16</cite></td>
<td class="s4"><cite>H:24</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:244</cite></td>
<td class="s4"><cite>Y:349</cite></td>
<td class="s4"><cite>W:47</cite></td>
<td class="s4"><cite>H:52</cite></td>
<td class="s4"><cite>X:238</cite></td>
<td class="s4"><cite>Y:342</cite></td>
<td class="s4"><cite>W:47</cite></td>
<td class="s4"><cite>H:52</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:38</cite></td>
<td class="s4"><cite>Y:374</cite></td>
<td class="s4"><cite>W:16</cite></td>
<td class="s4"><cite>H:15</cite></td>
<td class="s4"><cite>X:31</cite></td>
<td class="s4"><cite>Y:366</cite></td>
<td class="s4"><cite>W:17</cite></td>
<td class="s4"><cite>H:16</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:34</cite></td>
<td class="s4"><cite>Y:388</cite></td>
<td class="s4"><cite>W:16</cite></td>
<td class="s4"><cite>H:17</cite></td>
<td class="s4"><cite>X:148</cite></td>
<td class="s4"><cite>Y:423</cite></td>
<td class="s4"><cite>W:27</cite></td>
<td class="s4"><cite>H:24</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:154</cite></td>
<td class="s4"><cite>Y:430</cite></td>
<td class="s4"><cite>W:27</cite></td>
<td class="s4"><cite>H:24</cite></td>
<td class="s4"><cite>X:459</cite></td>
<td class="s4"><cite>Y:435</cite></td>
<td class="s4"><cite>W:24</cite></td>
<td class="s4"><cite>H:22</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:465</cite></td>
<td class="s4"><cite>Y:442</cite></td>
<td class="s4"><cite>W:25</cite></td>
<td class="s4"><cite>H:22</cite></td>
<td class="s4"><cite>X:119</cite></td>
<td class="s4"><cite>Y:450</cite></td>
<td class="s4"><cite>W:30</cite></td>
<td class="s4"><cite>H:46</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:126</cite></td>
<td class="s4"><cite>Y:457</cite></td>
<td class="s4"><cite>W:29</cite></td>
<td class="s4"><cite>H:46</cite></td>
<td class="s4"><cite>X:221</cite></td>
<td class="s4"><cite>Y:465</cite></td>
<td class="s4"><cite>W:17</cite></td>
<td class="s4"><cite>H:19</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:227</cite></td>
<td class="s4"><cite>Y:472</cite></td>
<td class="s4"><cite>W:17</cite></td>
<td class="s4"><cite>H:19</cite></td>
<td class="s4"><cite>X:250</cite></td>
<td class="s4"><cite>Y:594</cite></td>
<td class="s4"><cite>W:17</cite></td>
<td class="s4"><cite>H:18</cite></td>
</tr>
<tr>
<td class="hd">
<p style="height: 16px;"><cite>.</cite></p>
</td>
<td class="s3"><cite>X:256</cite></td>
<td class="s4"><cite>Y:601</cite></td>
<td class="s4"><cite>W:17</cite></td>
<td class="s4"><cite>H:18</cite></td>
<td><cite><br />
</cite></td>
<td><cite><br />
</cite></td>
<td><cite><br />
</cite></td>
</tr>
</tbody>
</table>
<p><cite><br />
Comparison<br />
S[X: 79, Y: 156, Width: 17, Height: 23] matched to T[X: 73, Y: 149, Width: 17, Height: 23]<br />
S[X: 158, Y: 249, Width: 32, Height: 31] matched to T[X: 152, Y: 242, Width: 32, Height: 32]<br />
S[X: 398, Y: 339, Width: 18, Height: 26] matched to T[X: 392, Y: 334, Width: 16, Height: 24]<br />
S[X: 38, Y: 374, Width: 16, Height: 15] matched to T[X: 31, Y: 366, Width: 17, Height: 16]<br />
S[X: 154, Y: 430, Width: 27, Height: 24] matched to T[X: 392, Y: 334, Width: 16, Height: 24]<br />
S[X: 126, Y: 457, Width: 29, Height: 46] matched to T[X: 31, Y: 366, Width: 17, Height: 16]<br />
S[X: 256, Y: 601, Width: 17, Height: 18] matched to T[X: 31, Y: 366, Width: 17, Height: 16]<br />
Non matched<br />
S[X: 34, Y: 388, Width: 16, Height: 17]<br />
S[X: 154, Y: 430, Width: 27, Height: 24]<br />
S[X: 465, Y: 442, Width: 25, Height: 22]<br />
S[X: 126, Y: 457, Width: 29, Height: 46]<br />
S[X: 227, Y: 472, Width: 17, Height: 19]<br />
S[X: 256, Y: 601, Width: 17, Height: 18]<br />
T[X: 148, Y: 423, Width: 27, Height: 24]<br />
T[X: 459, Y: 435, Width: 24, Height: 22]<br />
T[X: 119, Y: 450, Width: 30, Height: 46]<br />
T[X: 221, Y: 465, Width: 17, Height: 19]<br />
T[X: 250, Y: 594, Width: 17, Height: 18]<br />
</cite></p>
<p>I know its not perfect, I know its only matching about 50% of the blobs, but im working on it. I have a plan up my sleeve for this <img src='http://www.unauthorised-access.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/05/lab-image-detection-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An introduction to Pex</title>
		<link>http://www.unauthorised-access.com/2009/04/an-introduction-to-pex/</link>
		<comments>http://www.unauthorised-access.com/2009/04/an-introduction-to-pex/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 02:07:37 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[pex]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=198</guid>
		<description><![CDATA[Pex generates Unit Tests from Parameterized Unit Tests through Automated White box Testing based on Input Generation Ill be the first to admit, I have never been a big fan of unit testing. To me, it seems like a big waste of time. I&#8217;m not sure why, but I just don&#8217;t like it – I [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Pex generates Unit Tests from Parameterized Unit Tests through Automated White box Testing based on Input Generation</p></blockquote>
<p>Ill be the first to admit, I have never been a big fan of unit testing. To me, it seems like a big waste of time. I&#8217;m not sure why, but I just don&#8217;t like it – I suppose it has something to-do with spending time writing tests instead of actually doing proper, paid work. Yes, yes, I know that tests “prove” that your code works, as long as you have coded your tests right. But what if you haven&#8217;t?</p>
<p>Anyway, I thought id give Pex a test since it generates unit tests for me. I love things that generate things for me, because I like to do things as quickly as possible, and the computer is millions of times faster than me at generating stuff.</p>
<p>For starters – head over to the <a href="http://research.microsoft.com/en-us/projects/Pex/" target="_blank">Pex website</a>, and download it – I downloaded the academic version, since im running VS.NET 2008 pro. Installing it after downloading it also might help matters.</p>
<p>Once you have installed it, you should be able to just open up a project and when right clicking inside a .cs file, you should see a few menu items:</p>
<p><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="WindowClipping (192)" src="http://www.unauthorised-access.com/wp-content/uploads/2009/04/windowclipping192.png" border="0" alt="WindowClipping (192)" width="204" height="101" /></p>
<p>Once you click on that little baby, Pex should start whizzing into action. Be warned, Pex will only test Public classes and methods – it dosent like testing anything else that isnt public, and I believe it will give you a warning.</p>
<p>In VS.NET’s status bar, you will get a bunch of messages, along the lines of “Pex: listening to monitored process (cold start)” and then “Pex: Finished”. It should also pop up a window, something vaguely like the following:</p>
<p><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="Pex Exploration Results - stopped - 1 failed, 2 runs" src="http://www.unauthorised-access.com/wp-content/uploads/2009/04/pexexplorationresultsstopped1failed2runs1.png" border="0" alt="Pex Exploration Results - stopped - 1 failed, 2 runs" width="500" height="115" /></p>
<p>I know this looks confusing at first, but it really isn&#8217;t. Its quite simple really. You have various options, but what&#8217;s interesting (I think) is the grid view in the middle. The first icon says if the test passed or failed – green = pass, red = ? (Take a guess, gwan, take a guess!) The number denotes the number of the test (its incremental), and the name is the value it has tried If the test fails and throws an exception, that will be listed under the Summary and Error message bits.</p>
<p>If you click on the test, you can see the following to the side :</p>
<p><img style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="WindowClipping (194)" src="http://www.unauthorised-access.com/wp-content/uploads/2009/04/windowclipping194.png" border="0" alt="WindowClipping (194)" width="453" height="358" /></p>
<p>The details is the actual code for the unit test that it has executed. I know, it says “this.” instead of the class name, and that&#8217;s because Pex creates a copy of the code to run tests on, in a partial class. Under the stack trace subtab, it well, gives you the stack trace (Please tell me you knew what that would do. Please.)</p>
<p>This is where Pex becomes rather … brilliant &#8211; it allows you to save all of these generated tests into its own project, simply by selecting the tests you want to save, and hitting the fancy &#8220;Save Test…&#8221; button &#8211; it will go off, and generate its own project (It will ask you for the name of the project, where it should live etc, I will provide a screenshot later) &#8211; and it will save the tests to that project! Tests that you can run later, and you don&#8217;t have to use vs.net&#8217;s test suite &#8211; you can decide to plug in different testing libraries such as MBUnit (my current fav) by downloading extensions that are available on CodePlex, or I believe you can create your own.</p>
<p>More on Pex later!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/04/an-introduction-to-pex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OnItemCommand for Nettiers 2.3</title>
		<link>http://www.unauthorised-access.com/2009/04/onitemcommand-for-nettiers-23/</link>
		<comments>http://www.unauthorised-access.com/2009/04/onitemcommand-for-nettiers-23/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 12:12:55 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[NetTiers]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=184</guid>
		<description><![CDATA[Well the good news is I have submitted my patch to include the OnItemCommand for the TableRepeater in Nettiers 2.3 &#8211; You can either download the file from this link, or directly from here (it lives in WebLibrary\UI)]]></description>
			<content:encoded><![CDATA[<p>Well the good news is I have submitted my patch to include the OnItemCommand for the TableRepeater in Nettiers 2.3 &#8211; You can either download the file from <a href="http://code.google.com/p/nettiers/issues/detail?id=196">this link</a>, or directly from <a href="http://www.unauthorised-access.com/wp-content/uploads/2009/04/tablerepeater.cst">here</a> (it lives in WebLibrary\UI)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/04/onitemcommand-for-nettiers-23/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Missing page pointer: NOAVATAR</title>
		<link>http://www.unauthorised-access.com/2009/03/missing-page-pointer-noavatar/</link>
		<comments>http://www.unauthorised-access.com/2009/03/missing-page-pointer-noavatar/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 17:07:45 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[YAF]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[Yet Another Forum]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=165</guid>
		<description><![CDATA[If you get the following error with YAF: While using a custom language pack, you probably have tried visiting the forum, and you probably have read this following, brilliant, useful post: And guess what happens when you click on that link? HURRAH! Oh hangon, no thats not good. Anyway, the solution is to put this [...]]]></description>
			<content:encoded><![CDATA[<p>If you get the following error with YAF:</p>
<p><img class="alignnone size-full wp-image-169" title="YAF Error 1" src="http://www.unauthorised-access.com/wp-content/uploads/2009/03/windowclipping-125.png" alt="YAF Error 1" width="498" height="334" /></p>
<p>While using a custom language pack, you probably have tried visiting the forum, and you probably have read this following, brilliant, useful post:</p>
<p><img class="alignnone size-full wp-image-170" title="Very useful dev" src="http://www.unauthorised-access.com/wp-content/uploads/2009/03/windowclipping-123.png" alt="Very useful dev" width="406" height="317" /></p>
<p>And guess what happens when you click on that link?<a href="http://www.unauthorised-access.com/wp-content/uploads/2009/03/forum-error-google-chrome.png"><img class="alignnone size-full wp-image-171" title="forum-error-google-chrome" src="http://www.unauthorised-access.com/wp-content/uploads/2009/03/forum-error-google-chrome.png" alt="forum-error-google-chrome" width="500" height="172" /></a></p>
<p>HURRAH! Oh hangon, no thats not good. Anyway, the solution is to put this :</p>
<p>&lt;page name=&#8221;CP_EDITAVATAR&#8221;&gt;</p>
<p>&lt;Resource tag=&#8221;TITLE&#8221;&gt;Modify Avatar&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;AVATAR&#8221;&gt;Avatar&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;AVATARCURRENT&#8221;&gt;Current Avatar&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;AVATARNEW&#8221;&gt;Choose a New Avatar&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;AVATARUPLOAD&#8221;&gt;Upload Avatar from Your Computer:&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;AVATARDELETE&#8221;&gt;Clear Avatar&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;AVATARREMOTE&#8221;&gt;Enter URL of Avatar on Remote Server to Use:&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;OURAVATAR&#8221;&gt;Select your Avatar from our Collection:&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;OURAVATAR_SELECT&#8221;&gt;Click Here to Select an Avatar&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;AVATARTEXT&#8221;&gt;Avatar Explaination Text&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;NOAVATAR&#8221;&gt;[ No Avatar ]&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;WARN_TOOBIG&#8221;&gt;Image size can&#8217;t be larger than {0}x{1} pixels.&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;WARN_SIZE&#8221;&gt;The size of your image was {0}x{1} pixels.&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;WARN_RESIZED&#8221;&gt;The image was resized to fit.&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;WARN_BIGFILE&#8221;&gt;The size of your image can&#8217;t be more than {0} bytes.&lt;/Resource&gt;<br />
&lt;Resource tag=&#8221;WARN_FILESIZE&#8221;&gt;The size of your image was {0} bytes.&lt;/Resource&gt;<br />
&lt;/page&gt;</p>
<p>Into your chosen language xml file, and it should work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/03/missing-page-pointer-noavatar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nesting Repeaters without OnItemDataBound</title>
		<link>http://www.unauthorised-access.com/2009/02/nesting-repeaters-without-onitemdatabound/</link>
		<comments>http://www.unauthorised-access.com/2009/02/nesting-repeaters-without-onitemdatabound/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 19:12:53 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[OnItemDataBound]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[WebControls]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=110</guid>
		<description><![CDATA[And the page result is: abc 12345 def 67890]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-112" title="windowclipping-106" src="http://www.unauthorised-access.com/wp-content/uploads/2009/02/windowclipping-106.png" alt="windowclipping-106" width="397" height="172" /></p>
<p><img class="alignnone size-full wp-image-111" title="windowclipping-107" src="http://www.unauthorised-access.com/wp-content/uploads/2009/02/windowclipping-107.png" alt="windowclipping-107" width="462" height="118" /></p>
<p>And the page result is:</p>
<p><cite>abc                          12345<br />
def                          67890 </cite></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/02/nesting-repeaters-without-onitemdatabound/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Delete YAF from my database</title>
		<link>http://www.unauthorised-access.com/2009/02/delete-yaf-from-my-database/</link>
		<comments>http://www.unauthorised-access.com/2009/02/delete-yaf-from-my-database/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 16:12:25 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[YAF]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[Yet Another Forum]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=93</guid>
		<description><![CDATA[BEGIN TRAN DROP PROCEDURE yaf_registry_list DROP PROCEDURE yaf_checkemail_save DROP PROCEDURE yaf_registry_save DROP PROCEDURE yaf_user_delete DROP PROCEDURE yaf_active_updatemaxstats DROP PROCEDURE yaf_user_approve DROP PROCEDURE yaf_eventlog_delete DROP PROCEDURE yaf_poll_stats DROP PROCEDURE yaf_eventlog_create DROP PROCEDURE yaf_poll_save DROP PROCEDURE yaf_bannedip_save DROP PROCEDURE yaf_choice_vote DROP PROCEDURE yaf_bannedip_list DROP PROCEDURE yaf_pollvote_check DROP PROCEDURE yaf_bannedip_delete DROP PROCEDURE yaf_post_list DROP PROCEDURE yaf_category_list DROP PROCEDURE [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush: sql;">

BEGIN TRAN
DROP PROCEDURE yaf_registry_list
DROP PROCEDURE yaf_checkemail_save
DROP PROCEDURE yaf_registry_save
DROP PROCEDURE yaf_user_delete
DROP PROCEDURE yaf_active_updatemaxstats
DROP PROCEDURE yaf_user_approve
DROP PROCEDURE yaf_eventlog_delete
DROP PROCEDURE yaf_poll_stats
DROP PROCEDURE yaf_eventlog_create
DROP PROCEDURE yaf_poll_save
DROP PROCEDURE yaf_bannedip_save
DROP PROCEDURE yaf_choice_vote
DROP PROCEDURE yaf_bannedip_list
DROP PROCEDURE yaf_pollvote_check
DROP PROCEDURE yaf_bannedip_delete
DROP PROCEDURE yaf_post_list
DROP PROCEDURE yaf_category_list
DROP PROCEDURE yaf_user_accessmasks
DROP PROCEDURE yaf_category_save
DROP PROCEDURE yaf_forum_simplelist
DROP PROCEDURE yaf_category_simplelist
DROP PROCEDURE yaf_topic_delete
DROP PROCEDURE yaf_topic_active
DROP PROCEDURE yaf_forum_delete
DROP PROCEDURE yaf_topic_latest
DROP PROCEDURE yaf_forum_listpath
DROP PROCEDURE yaf_post_last10user
DROP PROCEDURE yaf_forum_listSubForums
DROP PROCEDURE yaf_message_approve
DROP PROCEDURE yaf_forum_moderatelist
DROP PROCEDURE yaf_message_delete
DROP PROCEDURE yaf_forum_list
DROP PROCEDURE yaf_pageload
DROP PROCEDURE yaf_forum_listall_fromcat
DROP PROCEDURE yaf_forum_listall
DROP PROCEDURE yaf_forum_save
DROP PROCEDURE yaf_forum_listallmymoderated
DROP PROCEDURE yaf_forum_updatelastpost
DROP PROCEDURE yaf_category_listread
DROP PROCEDURE yaf_forum_updatestats
DROP PROCEDURE yaf_user_list
DROP PROCEDURE yaf_forumaccess_group
DROP PROCEDURE yaf_nntpforum_update
DROP PROCEDURE yaf_group_save
DROP PROCEDURE yaf_topic_updatelastpost
DROP PROCEDURE yaf_message_update
DROP PROCEDURE yaf_topic_move
DROP PROCEDURE yaf_nntptopic_savemessage
DROP PROCEDURE yaf_system_initialize
DROP PROCEDURE yaf_nntpforum_list
DROP PROCEDURE yaf_system_updateversion
DROP PROCEDURE yaf_message_save
DROP PROCEDURE yaf_active_list
DROP PROCEDURE yaf_topic_prune
DROP PROCEDURE yaf_attachment_list
DROP PROCEDURE yaf_topic_save
DROP PROCEDURE yaf_board_create
DROP PROCEDURE yaf_board_delete
DROP PROCEDURE yaf_watchforum_list
DROP PROCEDURE yaf_board_poststats
DROP PROCEDURE yaf_category_delete
DROP PROCEDURE yaf_accessmask_delete
DROP PROCEDURE yaf_forumaccess_list
DROP PROCEDURE yaf_forumaccess_save
DROP PROCEDURE yaf_group_delete
DROP PROCEDURE yaf_forum_moderators
DROP PROCEDURE yaf_user_find
DROP PROCEDURE yaf_user_guest
DROP PROCEDURE yaf_pmessage_save
DROP PROCEDURE yaf_group_list
DROP PROCEDURE yaf_group_member
DROP PROCEDURE yaf_active_stats
DROP PROCEDURE yaf_usergroup_list
DROP PROCEDURE yaf_mail_createwatch
DROP PROCEDURE yaf_mail_delete
DROP PROCEDURE yaf_mail_list
DROP PROCEDURE yaf_message_findunread
DROP PROCEDURE yaf_message_getReplies
DROP PROCEDURE yaf_message_list
DROP PROCEDURE yaf_message_unapproved
DROP PROCEDURE yaf_board_stats
DROP PROCEDURE yaf_message_simplelist
DROP PROCEDURE yaf_watchtopic_list
DROP PROCEDURE yaf_post_list_reverse10
DROP PROCEDURE yaf_topic_listmessages
DROP PROCEDURE yaf_user_activity_rank
DROP PROCEDURE yaf_pmessage_list
DROP PROCEDURE yaf_forum_listread
DROP PROCEDURE yaf_pmessage_prune
DROP PROCEDURE yaf_topic_list
DROP PROCEDURE yaf_userpmessage_list
DROP PROCEDURE yaf_user_deleteold
DROP PROCEDURE yaf_pmessage_delete
DROP PROCEDURE yaf_smiley_delete
DROP PROCEDURE yaf_smiley_list
DROP PROCEDURE yaf_smiley_listunique
DROP PROCEDURE yaf_smiley_save
DROP PROCEDURE yaf_topic_lock
DROP PROCEDURE yaf_topic_findnext
DROP PROCEDURE yaf_topic_findprev
DROP PROCEDURE yaf_topic_info
DROP PROCEDURE yaf_topic_simplelist
DROP PROCEDURE yaf_forum_listtopics
DROP PROCEDURE yaf_user_removepointsbytopicid
DROP PROCEDURE yaf_user_resetpoints
DROP PROCEDURE yaf_user_removepoints
DROP PROCEDURE yaf_user_login
DROP PROCEDURE yaf_user_recoverpassword
DROP PROCEDURE yaf_user_nntp
DROP PROCEDURE yaf_user_savepassword
DROP PROCEDURE yaf_user_saveavatar
DROP PROCEDURE yaf_user_suspend
DROP PROCEDURE yaf_user_setpoints
DROP PROCEDURE yaf_active_listtopic
DROP PROCEDURE yaf_user_savesignature
DROP PROCEDURE yaf_active_listforum
DROP PROCEDURE yaf_userforum_list
DROP PROCEDURE yaf_user_upgrade
DROP PROCEDURE yaf_eventlog_list
DROP PROCEDURE yaf_user_simplelist
DROP PROCEDURE yaf_user_emails
DROP PROCEDURE yaf_user_getsignature
DROP PROCEDURE yaf_user_addpoints
DROP PROCEDURE yaf_user_adminsave
DROP PROCEDURE yaf_user_avatarimage
DROP PROCEDURE yaf_user_changepassword
DROP PROCEDURE yaf_user_deleteavatar
DROP PROCEDURE yaf_user_getpoints
DROP PROCEDURE yaf_watchforum_delete
DROP PROCEDURE yaf_watchforum_add
DROP PROCEDURE yaf_watchforum_check
DROP PROCEDURE yaf_watchtopic_delete
DROP PROCEDURE yaf_watchtopic_check
DROP PROCEDURE yaf_watchtopic_add
DROP PROCEDURE yaf_attachment_save
DROP PROCEDURE yaf_attachment_delete
DROP PROCEDURE yaf_attachment_download
DROP PROCEDURE yaf_usergroup_save
DROP PROCEDURE yaf_rank_delete
DROP PROCEDURE yaf_rank_list
DROP PROCEDURE yaf_rank_save
DROP PROCEDURE yaf_accessmask_save
DROP PROCEDURE yaf_accessmask_list
DROP PROCEDURE yaf_userforum_save
DROP PROCEDURE yaf_userforum_delete
DROP PROCEDURE yaf_board_save
DROP PROCEDURE yaf_board_list
DROP PROCEDURE yaf_nntpserver_delete
DROP PROCEDURE yaf_nntpserver_list
DROP PROCEDURE yaf_nntpserver_save
DROP PROCEDURE yaf_nntpforum_save
DROP PROCEDURE yaf_nntpforum_delete
DROP PROCEDURE yaf_nntptopic_list
DROP PROCEDURE yaf_pmessage_info
DROP PROCEDURE yaf_userpmessage_delete
DROP PROCEDURE yaf_pmessage_markread
DROP PROCEDURE yaf_replace_words_delete
DROP PROCEDURE yaf_replace_words_edit
DROP PROCEDURE yaf_replace_words_list
DROP PROCEDURE yaf_user_save
DROP PROCEDURE yaf_replace_words_save
DROP PROCEDURE yaf_checkemail_update
DROP VIEW yaf_vaccess
DROP FUNCTION yaf_forum_topics
DROP FUNCTION yaf_forum_posts
DROP FUNCTION yaf_bitset

ALTER TABLE yaf_Choice DROP CONSTRAINT [FK_yaf_Choice_yaf_Poll]
ALTER TABLE yaf_PollVote DROP CONSTRAINT [FK_yaf_PollVote_yaf_Poll]
ALTER TABLE yaf_Topic DROP CONSTRAINT [FK_yaf_Topic_yaf_Poll]
ALTER TABLE yaf_AccessMask DROP CONSTRAINT [FK_yaf_AccessMask_yaf_Board]
ALTER TABLE yaf_Active DROP CONSTRAINT [FK_yaf_Active_yaf_Board]
ALTER TABLE yaf_BannedIP DROP CONSTRAINT [FK_yaf_BannedIP_yaf_Board]
ALTER TABLE yaf_Category DROP CONSTRAINT [FK_yaf_Category_yaf_Board]
ALTER TABLE yaf_Group DROP CONSTRAINT [FK_yaf_Group_yaf_Board]
ALTER TABLE yaf_NntpServer DROP CONSTRAINT [FK_yaf_NntpServer_yaf_Board]
ALTER TABLE yaf_Rank DROP CONSTRAINT [FK_yaf_Rank_yaf_Board]
ALTER TABLE yaf_Registry DROP CONSTRAINT [FK_yaf_Registry_yaf_Board]
ALTER TABLE yaf_Smiley DROP CONSTRAINT [FK_yaf_Smiley_yaf_Board]
ALTER TABLE yaf_User DROP CONSTRAINT [FK_yaf_User_yaf_Board]
ALTER TABLE yaf_User DROP CONSTRAINT [FK_yaf_User_yaf_Rank]
ALTER TABLE yaf_Active DROP CONSTRAINT [FK_yaf_Active_yaf_User]
ALTER TABLE yaf_CheckEmail DROP CONSTRAINT [FK_yaf_CheckEmail_yaf_User]
ALTER TABLE yaf_EventLog DROP CONSTRAINT [FK_yaf_EventLog_yaf_User]
ALTER TABLE yaf_Forum DROP CONSTRAINT [FK_yaf_Forum_yaf_User]
ALTER TABLE yaf_Message DROP CONSTRAINT [FK_yaf_Message_yaf_User]
ALTER TABLE yaf_PMessage DROP CONSTRAINT [FK_yaf_PMessage_yaf_User1]
ALTER TABLE yaf_Topic DROP CONSTRAINT [FK_yaf_Topic_yaf_User]
ALTER TABLE yaf_Topic DROP CONSTRAINT [FK_yaf_Topic_yaf_User2]
ALTER TABLE yaf_UserForum DROP CONSTRAINT [FK_yaf_UserForum_yaf_User]
ALTER TABLE yaf_UserPMessage DROP CONSTRAINT [FK_yaf_UserPMessage_yaf_User]
ALTER TABLE yaf_WatchForum DROP CONSTRAINT [FK_yaf_WatchForum_yaf_User]
ALTER TABLE yaf_WatchTopic DROP CONSTRAINT [FK_yaf_WatchTopic_yaf_User]
ALTER TABLE yaf_Forum DROP CONSTRAINT [FK_yaf_Forum_yaf_Category]
ALTER TABLE yaf_Active DROP CONSTRAINT [FK_yaf_Active_yaf_Forum]
ALTER TABLE yaf_Forum DROP CONSTRAINT [FK_yaf_Forum_yaf_Forum]
ALTER TABLE yaf_ForumAccess DROP CONSTRAINT [FK_yaf_ForumAccess_yaf_Forum]
ALTER TABLE yaf_NntpForum DROP CONSTRAINT [FK_yaf_NntpForum_yaf_Forum]
ALTER TABLE yaf_Topic DROP CONSTRAINT [FK_yaf_Topic_yaf_Forum]
ALTER TABLE yaf_UserForum DROP CONSTRAINT [FK_yaf_UserForum_yaf_Forum]
ALTER TABLE yaf_WatchForum DROP CONSTRAINT [FK_yaf_WatchForum_yaf_Forum]
ALTER TABLE yaf_Attachment DROP CONSTRAINT [FK_yaf_Attachment_yaf_Message]
ALTER TABLE yaf_Forum DROP CONSTRAINT [FK_yaf_Forum_yaf_Message]
ALTER TABLE yaf_Message DROP CONSTRAINT [FK_yaf_Message_yaf_Message]
ALTER TABLE yaf_Topic DROP CONSTRAINT [FK_yaf_Topic_yaf_Message]
ALTER TABLE yaf_Active DROP CONSTRAINT [FK_yaf_Active_yaf_Topic]
ALTER TABLE yaf_Forum DROP CONSTRAINT [FK_yaf_Forum_yaf_Topic]
ALTER TABLE yaf_Message DROP CONSTRAINT [FK_yaf_Message_yaf_Topic]
ALTER TABLE yaf_NntpTopic DROP CONSTRAINT [FK_yaf_NntpTopic_yaf_Topic]
ALTER TABLE yaf_Topic DROP CONSTRAINT [FK_yaf_Topic_yaf_Topic]
ALTER TABLE yaf_WatchTopic DROP CONSTRAINT [FK_yaf_WatchTopic_yaf_Topic]
ALTER TABLE yaf_NntpForum DROP CONSTRAINT [FK_yaf_NntpForum_yaf_NntpServer]
ALTER TABLE yaf_NntpTopic DROP CONSTRAINT [FK_yaf_NntpTopic_yaf_NntpForum]
ALTER TABLE yaf_ForumAccess DROP CONSTRAINT [FK_yaf_ForumAccess_yaf_AccessMask]
ALTER TABLE yaf_UserForum DROP CONSTRAINT [FK_yaf_UserForum_yaf_AccessMask]
ALTER TABLE yaf_ForumAccess DROP CONSTRAINT [FK_yaf_ForumAccess_yaf_Group]
ALTER TABLE yaf_UserGroup DROP CONSTRAINT [FK_yaf_UserGroup_yaf_Group]
ALTER TABLE yaf_UserPMessage DROP CONSTRAINT [FK_yaf_UserPMessage_yaf_PMessage]

drop table dbo.yaf_AccessMask
drop table dbo.yaf_Active
drop table dbo.yaf_Attachment
drop table dbo.yaf_BannedIP
drop table dbo.yaf_Board
drop table dbo.yaf_Category
drop table dbo.yaf_CheckEmail
drop table dbo.yaf_Choice
drop table dbo.yaf_EventLog
drop table dbo.yaf_Forum
drop table dbo.yaf_ForumAccess
drop table dbo.yaf_Group
drop table dbo.yaf_Mail
drop table dbo.yaf_Message
drop table dbo.yaf_NntpForum
drop table dbo.yaf_NntpServer
drop table dbo.yaf_NntpTopic
drop table dbo.yaf_PMessage
drop table dbo.yaf_Poll
drop table dbo.yaf_PollVote
drop table dbo.yaf_Rank
drop table dbo.yaf_Registry
drop table dbo.yaf_Replace_Words
drop table dbo.yaf_Smiley
drop table dbo.yaf_Topic
drop table dbo.yaf_User
drop table dbo.yaf_UserForum
drop table dbo.yaf_UserGroup
drop table dbo.yaf_UserPMessage
drop table dbo.yaf_WatchForum
drop table dbo.yaf_WatchTopic

IF @@ERROR &amp;lt;&amp;gt; 0
BEGIN
ROLLBACK TRAN
return 11
END

COMMIT TRAN
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/02/delete-yaf-from-my-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dropping views, functions and proc&#8217;s</title>
		<link>http://www.unauthorised-access.com/2009/02/dropping-views-functions-and-stored-procedures/</link>
		<comments>http://www.unauthorised-access.com/2009/02/dropping-views-functions-and-stored-procedures/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 15:44:00 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[YAF]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[Yet Another Forum]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=86</guid>
		<description><![CDATA[Part 3 of my &#8220;Getting rid of YAF&#8221; series involves dropping views, functions and stored procedures. SELECT 'DROP PROCEDURE '+name FROM dbo.sysobjects WHERE (type = 'P') union all SELECT 'DROP VIEW ' + name from dbo.sysobjects WHERE (type = 'V') union all SELECT 'DROP FUNCTION ' + name from dbo.sysobjects WHERE (type = 'FN') Which [...]]]></description>
			<content:encoded><![CDATA[<p>Part 3 of my &#8220;Getting rid of YAF&#8221; series involves dropping views, functions and stored procedures.</p>
<pre class="brush: sql;">

SELECT 'DROP PROCEDURE '+name FROM dbo.sysobjects WHERE (type = 'P') union all
SELECT 'DROP VIEW ' + name from dbo.sysobjects WHERE (type = 'V') union all
SELECT 'DROP FUNCTION ' + name from dbo.sysobjects WHERE (type = 'FN')
</pre>
<p>Which should hopefully give you the following:</p>
<pre class="brush: sql;">

DROP PROCEDURE yaf_registry_list
DROP PROCEDURE yaf_checkemail_save
DROP PROCEDURE yaf_registry_save
DROP PROCEDURE yaf_user_delete
DROP PROCEDURE yaf_active_updatemaxstats
DROP PROCEDURE yaf_user_approve
DROP PROCEDURE yaf_eventlog_delete
DROP PROCEDURE yaf_poll_stats
DROP PROCEDURE yaf_eventlog_create
DROP PROCEDURE yaf_poll_save
DROP PROCEDURE yaf_bannedip_save
DROP PROCEDURE yaf_choice_vote
DROP PROCEDURE yaf_bannedip_list
DROP PROCEDURE yaf_pollvote_check
DROP PROCEDURE yaf_bannedip_delete
DROP PROCEDURE yaf_post_list
DROP PROCEDURE yaf_category_list
DROP PROCEDURE yaf_user_accessmasks
DROP PROCEDURE yaf_category_save
DROP PROCEDURE yaf_forum_simplelist
DROP PROCEDURE yaf_category_simplelist
DROP PROCEDURE yaf_topic_delete
DROP PROCEDURE yaf_topic_active
DROP PROCEDURE yaf_forum_delete
DROP PROCEDURE yaf_topic_latest
DROP PROCEDURE yaf_forum_listpath
DROP PROCEDURE yaf_post_last10user
DROP PROCEDURE yaf_forum_listSubForums
DROP PROCEDURE yaf_message_approve
DROP PROCEDURE yaf_forum_moderatelist
DROP PROCEDURE yaf_message_delete
DROP PROCEDURE yaf_forum_list
DROP PROCEDURE yaf_pageload
DROP PROCEDURE yaf_forum_listall_fromcat
DROP PROCEDURE yaf_forum_listall
DROP PROCEDURE yaf_forum_save
DROP PROCEDURE yaf_forum_listallmymoderated
DROP PROCEDURE yaf_forum_updatelastpost
DROP PROCEDURE yaf_category_listread
DROP PROCEDURE yaf_forum_updatestats
DROP PROCEDURE yaf_user_list
DROP PROCEDURE yaf_forumaccess_group
DROP PROCEDURE yaf_nntpforum_update
DROP PROCEDURE yaf_group_save
DROP PROCEDURE yaf_topic_updatelastpost
DROP PROCEDURE yaf_message_update
DROP PROCEDURE yaf_topic_move
DROP PROCEDURE yaf_nntptopic_savemessage
DROP PROCEDURE yaf_system_initialize
DROP PROCEDURE yaf_nntpforum_list
DROP PROCEDURE yaf_system_updateversion
DROP PROCEDURE yaf_message_save
DROP PROCEDURE yaf_active_list
DROP PROCEDURE yaf_topic_prune
DROP PROCEDURE yaf_attachment_list
DROP PROCEDURE yaf_topic_save
DROP PROCEDURE yaf_board_create
DROP PROCEDURE yaf_board_delete
DROP PROCEDURE yaf_watchforum_list
DROP PROCEDURE yaf_board_poststats
DROP PROCEDURE yaf_category_delete
DROP PROCEDURE yaf_accessmask_delete
DROP PROCEDURE yaf_forumaccess_list
DROP PROCEDURE yaf_forumaccess_save
DROP PROCEDURE yaf_group_delete
DROP PROCEDURE yaf_forum_moderators
DROP PROCEDURE yaf_user_find
DROP PROCEDURE yaf_user_guest
DROP PROCEDURE yaf_pmessage_save
DROP PROCEDURE yaf_group_list
DROP PROCEDURE yaf_group_member
DROP PROCEDURE yaf_active_stats
DROP PROCEDURE yaf_usergroup_list
DROP PROCEDURE yaf_mail_createwatch
DROP PROCEDURE yaf_mail_delete
DROP PROCEDURE yaf_mail_list
DROP PROCEDURE yaf_message_findunread
DROP PROCEDURE yaf_message_getReplies
DROP PROCEDURE yaf_message_list
DROP PROCEDURE yaf_message_unapproved
DROP PROCEDURE yaf_board_stats
DROP PROCEDURE yaf_message_simplelist
DROP PROCEDURE yaf_watchtopic_list
DROP PROCEDURE yaf_post_list_reverse10
DROP PROCEDURE yaf_topic_listmessages
DROP PROCEDURE yaf_user_activity_rank
DROP PROCEDURE yaf_pmessage_list
DROP PROCEDURE yaf_forum_listread
DROP PROCEDURE yaf_pmessage_prune
DROP PROCEDURE yaf_topic_list
DROP PROCEDURE yaf_userpmessage_list
DROP PROCEDURE yaf_user_deleteold
DROP PROCEDURE yaf_pmessage_delete
DROP PROCEDURE yaf_smiley_delete
DROP PROCEDURE yaf_smiley_list
DROP PROCEDURE yaf_smiley_listunique
DROP PROCEDURE yaf_smiley_save
DROP PROCEDURE yaf_topic_lock
DROP PROCEDURE yaf_topic_findnext
DROP PROCEDURE yaf_topic_findprev
DROP PROCEDURE yaf_topic_info
DROP PROCEDURE yaf_topic_simplelist
DROP PROCEDURE yaf_forum_listtopics
DROP PROCEDURE yaf_user_removepointsbytopicid
DROP PROCEDURE yaf_user_resetpoints
DROP PROCEDURE yaf_user_removepoints
DROP PROCEDURE yaf_user_login
DROP PROCEDURE yaf_user_recoverpassword
DROP PROCEDURE yaf_user_nntp
DROP PROCEDURE yaf_user_savepassword
DROP PROCEDURE yaf_user_saveavatar
DROP PROCEDURE yaf_user_suspend
DROP PROCEDURE yaf_user_setpoints
DROP PROCEDURE yaf_active_listtopic
DROP PROCEDURE yaf_user_savesignature
DROP PROCEDURE yaf_active_listforum
DROP PROCEDURE yaf_userforum_list
DROP PROCEDURE yaf_user_upgrade
DROP PROCEDURE yaf_eventlog_list
DROP PROCEDURE yaf_user_simplelist
DROP PROCEDURE yaf_user_emails
DROP PROCEDURE yaf_user_getsignature
DROP PROCEDURE yaf_user_addpoints
DROP PROCEDURE yaf_user_adminsave
DROP PROCEDURE yaf_user_avatarimage
DROP PROCEDURE yaf_user_changepassword
DROP PROCEDURE yaf_user_deleteavatar
DROP PROCEDURE yaf_user_getpoints
DROP PROCEDURE yaf_watchforum_delete
DROP PROCEDURE yaf_watchforum_add
DROP PROCEDURE yaf_watchforum_check
DROP PROCEDURE yaf_watchtopic_delete
DROP PROCEDURE yaf_watchtopic_check
DROP PROCEDURE yaf_watchtopic_add
DROP PROCEDURE yaf_attachment_save
DROP PROCEDURE yaf_attachment_delete
DROP PROCEDURE yaf_attachment_download
DROP PROCEDURE yaf_usergroup_save
DROP PROCEDURE yaf_rank_delete
DROP PROCEDURE yaf_rank_list
DROP PROCEDURE yaf_rank_save
DROP PROCEDURE yaf_accessmask_save
DROP PROCEDURE yaf_accessmask_list
DROP PROCEDURE yaf_userforum_save
DROP PROCEDURE yaf_userforum_delete
DROP PROCEDURE yaf_board_save
DROP PROCEDURE yaf_board_list
DROP PROCEDURE yaf_nntpserver_delete
DROP PROCEDURE yaf_nntpserver_list
DROP PROCEDURE yaf_nntpserver_save
DROP PROCEDURE yaf_nntpforum_save
DROP PROCEDURE yaf_nntpforum_delete
DROP PROCEDURE yaf_nntptopic_list
DROP PROCEDURE yaf_pmessage_info
DROP PROCEDURE yaf_userpmessage_delete
DROP PROCEDURE yaf_pmessage_markread
DROP PROCEDURE yaf_replace_words_delete
DROP PROCEDURE yaf_replace_words_edit
DROP PROCEDURE yaf_replace_words_list
DROP PROCEDURE yaf_user_save
DROP PROCEDURE yaf_replace_words_save
DROP PROCEDURE yaf_checkemail_update
DROP VIEW yaf_vaccess
DROP FUNCTION yaf_forum_topics
DROP FUNCTION yaf_forum_posts
DROP FUNCTION yaf_bitset
</pre>
<p>Using the scrips below and this script should be all you need to have a YAF free database.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/02/dropping-views-functions-and-stored-procedures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating FK&#8217;s</title>
		<link>http://www.unauthorised-access.com/2009/02/creating-fks/</link>
		<comments>http://www.unauthorised-access.com/2009/02/creating-fks/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 13:05:10 +0000</pubDate>
		<dc:creator>Monty</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Code Snippet]]></category>
		<category><![CDATA[YAF]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#.net]]></category>
		<category><![CDATA[Yet Another Forum]]></category>

		<guid isPermaLink="false">http://www.unauthorised-access.com/?p=79</guid>
		<description><![CDATA[If you get the following error, when trying to export data from YAF: You might want to try running this script, to generate the create FK statements. Inconjuction with the drop FK statements, it will alow you to generate YAF scripts painlessly. SELECT 'ALTER TABLE ' +  OBJECT_NAME(f.parent_object_id) + ' ADD CONSTRAINT '  + f.name [...]]]></description>
			<content:encoded><![CDATA[<p>If you get the following error, when trying to export data from YAF:</p>
<p><a href="http://www.unauthorised-access.com/wp-content/uploads/2009/02/sqlpubwiz.png"><img class="alignnone size-full wp-image-81" title="sqlpubwiz" src="http://www.unauthorised-access.com/wp-content/uploads/2009/02/sqlpubwiz.png" alt="sqlpubwiz" width="500" height="128" /></a></p>
<p>You might want to try running this script, to generate the create FK statements. Inconjuction with the drop FK statements, it will alow you to generate YAF scripts painlessly.</p>
<pre class="brush: sql;">

SELECT 'ALTER TABLE ' +  OBJECT_NAME(f.parent_object_id) + ' ADD CONSTRAINT '  + f.name + ' FOREIGN KEY (' + COL_NAME(fc.parent_object_id, fc.parent_column_id) + ') REFERENCES ' + OBJECT_NAME (f.referenced_object_id) + '(' + COL_NAME(fc.referenced_object_id, fc.referenced_column_id) + ')' FROM sys.foreign_keys AS f INNER JOIN sys.foreign_key_columns AS fc ON f.OBJECT_ID = fc.constraint_object_id
</pre>
<p>It should give you an output like:</p>
<pre class="brush: sql;">

ALTER TABLE yaf_Choice ADD CONSTRAINT FK_yaf_Choice_yaf_Poll FOREIGN KEY (PollID) REFERENCES yaf_Poll(PollID)
ALTER TABLE yaf_Topic ADD CONSTRAINT FK_yaf_Topic_yaf_Poll FOREIGN KEY (PollID) REFERENCES yaf_Poll(PollID)
ALTER TABLE yaf_PollVote ADD CONSTRAINT FK_yaf_PollVote_yaf_Poll FOREIGN KEY (PollID) REFERENCES yaf_Poll(PollID)
ALTER TABLE yaf_AccessMask ADD CONSTRAINT FK_yaf_AccessMask_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_Active ADD CONSTRAINT FK_yaf_Active_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_BannedIP ADD CONSTRAINT FK_yaf_BannedIP_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_Category ADD CONSTRAINT FK_yaf_Category_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_Group ADD CONSTRAINT FK_yaf_Group_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_NntpServer ADD CONSTRAINT FK_yaf_NntpServer_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_Rank ADD CONSTRAINT FK_yaf_Rank_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_Registry ADD CONSTRAINT FK_yaf_Registry_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_Smiley ADD CONSTRAINT FK_yaf_Smiley_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_User ADD CONSTRAINT FK_yaf_User_yaf_Board FOREIGN KEY (BoardID) REFERENCES yaf_Board(BoardID)
ALTER TABLE yaf_User ADD CONSTRAINT FK_yaf_User_yaf_Rank FOREIGN KEY (RankID) REFERENCES yaf_Rank(RankID)
ALTER TABLE yaf_Active ADD CONSTRAINT FK_yaf_Active_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_CheckEmail ADD CONSTRAINT FK_yaf_CheckEmail_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_EventLog ADD CONSTRAINT FK_yaf_EventLog_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_Forum ADD CONSTRAINT FK_yaf_Forum_yaf_User FOREIGN KEY (LastUserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_Message ADD CONSTRAINT FK_yaf_Message_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_PMessage ADD CONSTRAINT FK_yaf_PMessage_yaf_User1 FOREIGN KEY (FromUserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_Topic ADD CONSTRAINT FK_yaf_Topic_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_Topic ADD CONSTRAINT FK_yaf_Topic_yaf_User2 FOREIGN KEY (LastUserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_UserForum ADD CONSTRAINT FK_yaf_UserForum_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_UserGroup ADD CONSTRAINT FK_yaf_UserGroup_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_UserPMessage ADD CONSTRAINT FK_yaf_UserPMessage_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_WatchForum ADD CONSTRAINT FK_yaf_WatchForum_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_WatchTopic ADD CONSTRAINT FK_yaf_WatchTopic_yaf_User FOREIGN KEY (UserID) REFERENCES yaf_User(UserID)
ALTER TABLE yaf_Forum ADD CONSTRAINT FK_yaf_Forum_yaf_Category FOREIGN KEY (CategoryID) REFERENCES yaf_Category(CategoryID)
ALTER TABLE yaf_Active ADD CONSTRAINT FK_yaf_Active_yaf_Forum FOREIGN KEY (ForumID) REFERENCES yaf_Forum(ForumID)
ALTER TABLE yaf_Forum ADD CONSTRAINT FK_yaf_Forum_yaf_Forum FOREIGN KEY (ParentID) REFERENCES yaf_Forum(ForumID)
ALTER TABLE yaf_ForumAccess ADD CONSTRAINT FK_yaf_ForumAccess_yaf_Forum FOREIGN KEY (ForumID) REFERENCES yaf_Forum(ForumID)
ALTER TABLE yaf_NntpForum ADD CONSTRAINT FK_yaf_NntpForum_yaf_Forum FOREIGN KEY (ForumID) REFERENCES yaf_Forum(ForumID)
ALTER TABLE yaf_Topic ADD CONSTRAINT FK_yaf_Topic_yaf_Forum FOREIGN KEY (ForumID) REFERENCES yaf_Forum(ForumID)
ALTER TABLE yaf_UserForum ADD CONSTRAINT FK_yaf_UserForum_yaf_Forum FOREIGN KEY (ForumID) REFERENCES yaf_Forum(ForumID)
ALTER TABLE yaf_WatchForum ADD CONSTRAINT FK_yaf_WatchForum_yaf_Forum FOREIGN KEY (ForumID) REFERENCES yaf_Forum(ForumID)
ALTER TABLE yaf_Attachment ADD CONSTRAINT FK_yaf_Attachment_yaf_Message FOREIGN KEY (MessageID) REFERENCES yaf_Message(MessageID)
ALTER TABLE yaf_Forum ADD CONSTRAINT FK_yaf_Forum_yaf_Message FOREIGN KEY (LastMessageID) REFERENCES yaf_Message(MessageID)
ALTER TABLE yaf_Message ADD CONSTRAINT FK_yaf_Message_yaf_Message FOREIGN KEY (ReplyTo) REFERENCES yaf_Message(MessageID)
ALTER TABLE yaf_Topic ADD CONSTRAINT FK_yaf_Topic_yaf_Message FOREIGN KEY (LastMessageID) REFERENCES yaf_Message(MessageID)
ALTER TABLE yaf_Active ADD CONSTRAINT FK_yaf_Active_yaf_Topic FOREIGN KEY (TopicID) REFERENCES yaf_Topic(TopicID)
ALTER TABLE yaf_Forum ADD CONSTRAINT FK_yaf_Forum_yaf_Topic FOREIGN KEY (LastTopicID) REFERENCES yaf_Topic(TopicID)
ALTER TABLE yaf_Message ADD CONSTRAINT FK_yaf_Message_yaf_Topic FOREIGN KEY (TopicID) REFERENCES yaf_Topic(TopicID)
ALTER TABLE yaf_NntpTopic ADD CONSTRAINT FK_yaf_NntpTopic_yaf_Topic FOREIGN KEY (TopicID) REFERENCES yaf_Topic(TopicID)
ALTER TABLE yaf_Topic ADD CONSTRAINT FK_yaf_Topic_yaf_Topic FOREIGN KEY (TopicMovedID) REFERENCES yaf_Topic(TopicID)
ALTER TABLE yaf_WatchTopic ADD CONSTRAINT FK_yaf_WatchTopic_yaf_Topic FOREIGN KEY (TopicID) REFERENCES yaf_Topic(TopicID)
ALTER TABLE yaf_NntpForum ADD CONSTRAINT FK_yaf_NntpForum_yaf_NntpServer FOREIGN KEY (NntpServerID) REFERENCES yaf_NntpServer(NntpServerID)
ALTER TABLE yaf_NntpTopic ADD CONSTRAINT FK_yaf_NntpTopic_yaf_NntpForum FOREIGN KEY (NntpForumID) REFERENCES yaf_NntpForum(NntpForumID)
ALTER TABLE yaf_ForumAccess ADD CONSTRAINT FK_yaf_ForumAccess_yaf_AccessMask FOREIGN KEY (AccessMaskID) REFERENCES yaf_AccessMask(AccessMaskID)
ALTER TABLE yaf_UserForum ADD CONSTRAINT FK_yaf_UserForum_yaf_AccessMask FOREIGN KEY (AccessMaskID) REFERENCES yaf_AccessMask(AccessMaskID)
ALTER TABLE yaf_ForumAccess ADD CONSTRAINT FK_yaf_ForumAccess_yaf_Group FOREIGN KEY (GroupID) REFERENCES yaf_Group(GroupID)
ALTER TABLE yaf_UserGroup ADD CONSTRAINT FK_yaf_UserGroup_yaf_Group FOREIGN KEY (GroupID) REFERENCES yaf_Group(GroupID)
ALTER TABLE yaf_UserPMessage ADD CONSTRAINT FK_yaf_UserPMessage_yaf_PMessage FOREIGN KEY (PMessageID) REFERENCES yaf_PMessage(PMessageID)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.unauthorised-access.com/2009/02/creating-fks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
