<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-326773441607666401</id><updated>2024-09-10T07:28:07.866+05:30</updated><category term="DNN"/><category term="Dot net Nuke"/><category term="Dotnet nuke"/><category term="File extensions"/><category term="Screen resolution"/><category term="Silverlight"/><category term="add file extension"/><category term="remove file extension"/><title type='text'>Technology Hunt</title><subtitle type='html'>This blog is about the dot net technologies that I have learnt from my working experience so far.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-326773441607666401.post-7490171585851938402</id><published>2014-01-28T16:54:00.001+05:30</published><updated>2014-01-28T17:06:11.307+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="add file extension"/><category scheme="http://www.blogger.com/atom/ns#" term="DNN"/><category scheme="http://www.blogger.com/atom/ns#" term="Dot net Nuke"/><category scheme="http://www.blogger.com/atom/ns#" term="Dotnet nuke"/><category scheme="http://www.blogger.com/atom/ns#" term="File extensions"/><category scheme="http://www.blogger.com/atom/ns#" term="remove file extension"/><title type='text'>How to manage File Extensions in Dotnet Nuke.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In order to add or remove a file extension in dot net nuke you need to follow following steps:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Login as a Superuser (or Host).&lt;/li&gt;
&lt;li&gt;Go to the Host Settings page.&lt;/li&gt;
&lt;li&gt;Go to the tab &quot;Other Settings&quot;.&lt;/li&gt;
&lt;li&gt;Find the &quot;Allowable File Extensions&quot; field.&lt;/li&gt;
&lt;li&gt;Add or remove file extensions as desired to allow or disallow file types, separated by commas.&lt;/li&gt;
&lt;li&gt;Click &quot;Update&quot; at the bottom of the page to save your changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/7490171585851938402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vivek-rathore.blogspot.com/2014/01/how-to-manage-allowable-file-extensions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/7490171585851938402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/7490171585851938402'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/2014/01/how-to-manage-allowable-file-extensions.html' title='How to manage File Extensions in Dotnet Nuke.'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-326773441607666401.post-7178702942276517572</id><published>2012-07-26T09:10:00.000+05:30</published><updated>2012-07-26T09:10:13.646+05:30</updated><title type='text'>How to drop all objects in a SQL Server Database</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
    Courtesy: &lt;a href=&#39;http://paigecsharp.blogspot.com.au/&#39;&gt;Paige C#&lt;/a&gt;
    &lt;div style=&quot;font-size: 10pt; background: #f8f8f8; color: black; font-family: consolas&quot;&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: green&quot;&gt;/* Drop all non-system stored procs */&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;128&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@SQL &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;254&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;sysobjects &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[type] &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;P&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;category
                &lt;/span&gt;= &lt;span style=&quot;background: #e6ffff&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER
                    BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name]&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;is not null&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;BEGIN&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @SQL &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;DROP PROCEDURE [dbo].[&#39; &lt;/span&gt;
            + &lt;span style=&quot;color: navy&quot;&gt;RTRIM&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;)
            +&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;]&#39;&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;EXEC &lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@SQL&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;PRINT &lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;Dropped Procedure: &#39; &lt;/span&gt;+ &lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @name &lt;/span&gt;= (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;
                    1 &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;sysobjects &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[type] &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;P&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;category
                &lt;/span&gt;= &lt;span style=&quot;background: #e6ffff&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&amp;gt; &lt;span style=&quot;color: maroon&quot;&gt;@name
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name]&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;END&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;GO&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: green&quot;&gt;/* Drop all views */&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;128&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@SQL &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;254&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;sysobjects &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[type] &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;V&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;category
                &lt;/span&gt;= &lt;span style=&quot;background: #e6ffff&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER
                    BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name]&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;IS NOT NULL&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;BEGIN&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @SQL &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;DROP VIEW [dbo].[&#39; &lt;/span&gt;+
            &lt;span style=&quot;color: navy&quot;&gt;RTRIM&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;)
            +&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;]&#39;&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;EXEC &lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@SQL&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;PRINT &lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;Dropped View: &#39; &lt;/span&gt;+ &lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @name &lt;/span&gt;= (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;
                    1 &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;sysobjects &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[type] &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;V&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;category
                &lt;/span&gt;= &lt;span style=&quot;background: #e6ffff&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&amp;gt; &lt;span style=&quot;color: maroon&quot;&gt;@name
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name]&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;END&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;GO &lt;/span&gt;
        &lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: green&quot;&gt;/* Drop all functions */&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;128&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@SQL &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;254&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;sysobjects &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[type] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;IN &lt;/span&gt;
            (&lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FN&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;IF&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;TF&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FS&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FT&#39;&lt;/span&gt;)
            &lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;category &lt;/span&gt;
            = &lt;span style=&quot;background: #e6ffff&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name]&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;IS NOT NULL&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;BEGIN&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @SQL &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;DROP FUNCTION [dbo].[&#39; &lt;/span&gt;
            + &lt;span style=&quot;color: navy&quot;&gt;RTRIM&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;)
            +&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;]&#39;&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;EXEC &lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@SQL&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;PRINT &lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;Dropped Function: &#39; &lt;/span&gt;+ &lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @name &lt;/span&gt;= (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;
                    1 &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;sysobjects &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[type] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;IN &lt;/span&gt;
            (&lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FN&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;IF&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;TF&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FS&#39;&lt;/span&gt;,
            &lt;span style=&quot;color: maroon&quot;&gt;N&lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FT&#39;&lt;/span&gt;)
            &lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;category &lt;/span&gt;
            = &lt;span style=&quot;background: #e6ffff&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&amp;gt; &lt;span style=&quot;color: maroon&quot;&gt;@name
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name]&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;END&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;GO &lt;/span&gt;
        &lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: green&quot;&gt;/* Drop all Foreign Key constraints */&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;128&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@constraint
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;254&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@SQL &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;254&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TABLE_NAME &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;INFORMATION_SCHEMA&lt;/span&gt;.&lt;span style=&quot;color: maroon&quot;&gt;TABLE_CONSTRAINTS
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;constraint_catalog&lt;/span&gt;=&lt;span
                style=&quot;color: navy&quot;&gt;DB_NAME&lt;/span&gt;() &lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                    CONSTRAINT_TYPE &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FOREIGN KEY&#39;
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TABLE_NAME&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;is not null&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;BEGIN&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @constraint &lt;/span&gt;= (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;
                    1 &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;
                        FROM &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;INFORMATION_SCHEMA&lt;/span&gt;.&lt;span style=&quot;color: maroon&quot;&gt;TABLE_CONSTRAINTS
                        &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;constraint_catalog&lt;/span&gt;=&lt;span
                            style=&quot;color: navy&quot;&gt;DB_NAME&lt;/span&gt;() &lt;span style=&quot;color: navy&quot;&gt;AND
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_TYPE &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;FOREIGN KEY&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                    TABLE_NAME &lt;/span&gt;= &lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;
                        ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @constraint &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;IS NOT NULL&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;BEGIN&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;@SQL &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;ALTER TABLE
                [dbo].[&#39; &lt;/span&gt;+ &lt;span style=&quot;color: navy&quot;&gt;RTRIM&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;)
            +&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;] DROP CONSTRAINT &#39; &lt;/span&gt;+ &lt;span style=&quot;color: navy&quot;&gt;
                RTRIM&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@constraint&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;EXEC &lt;/span&gt;
            (&lt;span style=&quot;color: maroon&quot;&gt;@SQL&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;PRINT &lt;/span&gt;
            &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;Dropped FK Constraint: &#39; &lt;/span&gt;+ &lt;span style=&quot;color: maroon&quot;&gt;
                @constraint &lt;/span&gt;+ &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39; on &#39; &lt;/span&gt;+ &lt;span style=&quot;color: maroon&quot;&gt;
                    @name&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;@constraint &lt;/span&gt;= (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP
            &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;INFORMATION_SCHEMA&lt;/span&gt;.&lt;span
                style=&quot;color: maroon&quot;&gt;TABLE_CONSTRAINTS &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;constraint_catalog&lt;/span&gt;=&lt;span style=&quot;color: navy&quot;&gt;DB_NAME&lt;/span&gt;()
            &lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_TYPE
            &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FOREIGN KEY&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;
                AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME &lt;/span&gt;&amp;lt;&amp;gt; &lt;span style=&quot;color: maroon&quot;&gt;
                    @constraint &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                        TABLE_NAME &lt;/span&gt;= &lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;
                            ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;END&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TABLE_NAME &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;INFORMATION_SCHEMA&lt;/span&gt;.&lt;span style=&quot;color: maroon&quot;&gt;TABLE_CONSTRAINTS
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;constraint_catalog&lt;/span&gt;=&lt;span
                style=&quot;color: navy&quot;&gt;DB_NAME&lt;/span&gt;() &lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                    CONSTRAINT_TYPE &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;FOREIGN KEY&#39;
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TABLE_NAME&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;END&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;GO&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: green&quot;&gt;/* Drop all Primary Key constraints */&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;128&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@constraint
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;254&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@SQL &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;254&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TABLE_NAME &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;INFORMATION_SCHEMA&lt;/span&gt;.&lt;span style=&quot;color: maroon&quot;&gt;TABLE_CONSTRAINTS
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;constraint_catalog&lt;/span&gt;=&lt;span
                style=&quot;color: navy&quot;&gt;DB_NAME&lt;/span&gt;() &lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                    CONSTRAINT_TYPE &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;PRIMARY KEY&#39;
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TABLE_NAME&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;IS NOT NULL&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;BEGIN&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @constraint &lt;/span&gt;= (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;
                    1 &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;
                        FROM &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;INFORMATION_SCHEMA&lt;/span&gt;.&lt;span style=&quot;color: maroon&quot;&gt;TABLE_CONSTRAINTS
                        &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;constraint_catalog&lt;/span&gt;=&lt;span
                            style=&quot;color: navy&quot;&gt;DB_NAME&lt;/span&gt;() &lt;span style=&quot;color: navy&quot;&gt;AND
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_TYPE &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;PRIMARY KEY&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                    TABLE_NAME &lt;/span&gt;= &lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;
                        ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @constraint &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;is not null&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;BEGIN&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;@SQL &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;ALTER TABLE
                [dbo].[&#39; &lt;/span&gt;+ &lt;span style=&quot;color: navy&quot;&gt;RTRIM&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;)
            +&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;] DROP CONSTRAINT &#39; &lt;/span&gt;+ &lt;span style=&quot;color: navy&quot;&gt;
                RTRIM&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@constraint&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;EXEC &lt;/span&gt;
            (&lt;span style=&quot;color: maroon&quot;&gt;@SQL&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;PRINT &lt;/span&gt;
            &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;Dropped PK Constraint: &#39; &lt;/span&gt;+ &lt;span style=&quot;color: maroon&quot;&gt;
                @constraint &lt;/span&gt;+ &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39; on &#39; &lt;/span&gt;+ &lt;span style=&quot;color: maroon&quot;&gt;
                    @name&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;@constraint &lt;/span&gt;= (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP
            &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;INFORMATION_SCHEMA&lt;/span&gt;.&lt;span
                style=&quot;color: maroon&quot;&gt;TABLE_CONSTRAINTS &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;constraint_catalog&lt;/span&gt;=&lt;span style=&quot;color: navy&quot;&gt;DB_NAME&lt;/span&gt;()
            &lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_TYPE
            &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;PRIMARY KEY&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;
                AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME &lt;/span&gt;&amp;lt;&amp;gt; &lt;span style=&quot;color: maroon&quot;&gt;
                    @constraint &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                        TABLE_NAME &lt;/span&gt;= &lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;
                            ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;CONSTRAINT_NAME&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;END&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TABLE_NAME &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;INFORMATION_SCHEMA&lt;/span&gt;.&lt;span style=&quot;color: maroon&quot;&gt;TABLE_CONSTRAINTS
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;constraint_catalog&lt;/span&gt;=&lt;span
                style=&quot;color: navy&quot;&gt;DB_NAME&lt;/span&gt;() &lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                    CONSTRAINT_TYPE &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;PRIMARY KEY&#39;
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;TABLE_NAME&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;END&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;GO&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: green&quot;&gt;/* Drop all tables */&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;128&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;DECLARE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@SQL &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;VARCHAR&lt;/span&gt;(&lt;span style=&quot;background: #e6ffff&quot;&gt;254&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;sysobjects &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[type] &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;U&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;category
                &lt;/span&gt;= &lt;span style=&quot;background: #e6ffff&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER
                    BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name]&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;WHILE &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            &lt;span style=&quot;color: navy&quot;&gt;IS NOT NULL&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;BEGIN&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;
                @SQL &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;DROP TABLE [dbo].[&#39; &lt;/span&gt;
            + &lt;span style=&quot;color: navy&quot;&gt;RTRIM&lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;)
            +&lt;span style=&quot;background: #ffffe6&quot;&gt;&#39;]&#39;&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;EXEC &lt;/span&gt;(&lt;span style=&quot;color: maroon&quot;&gt;@SQL&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&amp;#160;&amp;#160; &lt;span style=&quot;color: navy&quot;&gt;PRINT &lt;/span&gt;&lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;Dropped Table: &#39; &lt;/span&gt;+ &lt;span style=&quot;color: maroon&quot;&gt;@name&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;SELECT &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;@name &lt;/span&gt;
            = (&lt;span style=&quot;color: navy&quot;&gt;SELECT TOP &lt;/span&gt;&lt;span style=&quot;background: #e6ffff&quot;&gt;1
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;FROM
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;sysobjects &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;WHERE
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[type] &lt;/span&gt;= &lt;span style=&quot;background: #ffffe6&quot;&gt;
                &#39;U&#39; &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;category
                &lt;/span&gt;= &lt;span style=&quot;background: #e6ffff&quot;&gt;0 &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;AND
            &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name] &lt;/span&gt;&amp;gt; &lt;span style=&quot;color: maroon&quot;&gt;@name
            &lt;/span&gt;&lt;span style=&quot;color: navy&quot;&gt;ORDER BY &lt;/span&gt;&lt;span style=&quot;color: maroon&quot;&gt;[name]&lt;/span&gt;)&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: navy&quot;&gt;END&lt;/span&gt;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &lt;span style=&quot;color: maroon&quot;&gt;GO &lt;/span&gt;
        &lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&lt;/p&gt;
        &lt;p style=&quot;margin: 0px&quot;&gt;
            &amp;#160;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div style=&#39;clear: both;&#39;&gt;
    &lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/7178702942276517572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vivek-rathore.blogspot.com/2012/07/how-to-drop-all-objects-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/7178702942276517572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/7178702942276517572'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/2012/07/how-to-drop-all-objects-in-sql-server.html' title='How to drop all objects in a SQL Server Database'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-326773441607666401.post-4955934787000458029</id><published>2012-07-26T08:55:00.000+05:30</published><updated>2012-07-26T08:55:08.632+05:30</updated><title type='text'>How to update skin through Dotnet Nuke database</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
update [dbo].[PortalSettings]
set SettingValue=&#39;[G]Skins/YourSkin.ascx&#39; 
where
SettingName=&#39;DefaultPortalSkin&#39;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/4955934787000458029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vivek-rathore.blogspot.com/2012/07/how-to-update-skin-through-dotnet-nuke.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/4955934787000458029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/4955934787000458029'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/2012/07/how-to-update-skin-through-dotnet-nuke.html' title='How to update skin through Dotnet Nuke database'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-326773441607666401.post-4693359532576185787</id><published>2011-09-26T13:09:00.000+05:30</published><updated>2011-09-26T13:09:17.458+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Screen resolution"/><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight"/><title type='text'>How to get the current screen resolution in Silverlight</title><content type='html'>To get the screen resultion in silverlight we can use the browser&#39;s window object. The browser window object is HtmlPage.Window. The namespace under which the HtmlPage comes is System.Windows.Browser.&lt;br /&gt;
Here is the code to find out the width and height according to current screen resolution.&lt;br /&gt;
&lt;br /&gt;
string width = HtmlPage.Window.Eval(&quot;screen.width&quot;).ToString();&lt;br /&gt;
string height = HtmlPage.Window.Eval(&quot;screen.height&quot;).ToString();</content><link rel='replies' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/4693359532576185787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vivek-rathore.blogspot.com/2011/09/how-to-get-current-screen-resolution-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/4693359532576185787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/4693359532576185787'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/2011/09/how-to-get-current-screen-resolution-in.html' title='How to get the current screen resolution in Silverlight'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><thr:total>0</thr:total><georss:featurename>Gurgaon, Delhi, India</georss:featurename><georss:point>28.46385 77.017837999999983</georss:point><georss:box>-8.1247479999999968 17.252212999999983 65.052448 136.78346299999998</georss:box></entry><entry><id>tag:blogger.com,1999:blog-326773441607666401.post-7776844505041972608</id><published>2011-05-30T16:17:00.005+05:30</published><updated>2011-05-30T16:23:54.796+05:30</updated><title type='text'>How to delete files in a directory</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Just write one line code to delete the files from the directory.&lt;br /&gt;
&lt;br /&gt;
string dirPath = &quot;C://XMLFiles&quot;;&lt;br /&gt;
//search for the xml files in the directory and delete all files&lt;br /&gt;
new List&lt;string&gt;(Directory.GetFiles(dirPath,@&quot;*.xml&quot;)).ForEach(file =&gt; { File.Delete(file); });   &lt;br /&gt;
&lt;br /&gt;
Here, I am deleting all the XML files from the dirPath directory.&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/7776844505041972608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vivek-rathore.blogspot.com/2011/05/how-to-delete-files-in-directory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/7776844505041972608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/7776844505041972608'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/2011/05/how-to-delete-files-in-directory.html' title='How to delete files in a directory'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-326773441607666401.post-8453749983212325711</id><published>2011-03-14T11:46:00.001+05:30</published><updated>2011-05-30T16:21:32.103+05:30</updated><title type='text'>Module Definitions tab missing in DNN host navigation</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Sometimes you have to face the negative consequences of working in a team. Well this is not the case for everyone. But, I faced the same problem, the module definitions was deleted by some of the team member and I was scratching my head to figure out where it disappeared?&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Well, after track back I figured out that the tabs appearance settings are stored in the DNN&#39;s Tabs table in database.&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;So, I investigated that the IsDeleted value was set to true for the Module Definitions tab. Setting the value back to false worked for me :)&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/8453749983212325711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vivek-rathore.blogspot.com/2011/03/module-definitions-tab-missing-in-dnn.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/8453749983212325711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/8453749983212325711'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/2011/03/module-definitions-tab-missing-in-dnn.html' title='Module Definitions tab missing in DNN host navigation'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-326773441607666401.post-5037559474508449706</id><published>2010-12-07T15:36:00.000+05:30</published><updated>2010-12-07T16:42:09.704+05:30</updated><title type='text'>Install missing templates in the installed Visual Studio templates</title><content type='html'>&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;One day I tried to create new WCF Service Application and when i opened the Visual studio and clicked on Add new project I found that this project option is missing from my Visual studio templates. To add missing templates to your current installed templates you need to run following command on Visual studio command prompt after closing all the instances of the Visual studio.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;devenv/installvstemplates&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Press Enter. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Georgia, &amp;quot;Times New Roman&amp;quot;, serif;&quot;&gt;Let the processing to be completed and then open visual studio. Now all the missing templates would be visible under Visual Studio installed templates.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/5037559474508449706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vivek-rathore.blogspot.com/2010/12/insall-mission-templates-in-installed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/5037559474508449706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/5037559474508449706'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/2010/12/insall-mission-templates-in-installed.html' title='Install missing templates in the installed Visual Studio templates'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-326773441607666401.post-3339778885689548697</id><published>2010-12-01T16:16:00.001+05:30</published><updated>2011-03-14T16:49:44.591+05:30</updated><title type='text'>Custom Assembly in Sql Server Reporting Services (SSRS).</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Most of the times we need to write code in our SSRS reports. So, the goal of this article, to show you how easy it really is to write custom code for SQL Server Reporting Services. We can write the code in two ways:&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;1. Embedded code&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;2. Custom Assemblies&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;b&gt;Embedded Code:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;So let&#39;s get started and add some embedded code to a report. Open Visual Studio and create a new report project and a new report (Right click the project -&amp;gt; Add New Item -&amp;gt; Report). &lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Follow the steps:&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;1. Go to Report menu and click Report Properties. &lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;(If the Report menu is not available, click within the report design area.)&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;2. On the Code tab, in Custom Code, type the code.&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;e.g&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Public Function Hello() as String&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Return &quot;Hello All&quot;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;End Function&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;Now add a textbox to the report and add the code =Code.Hello() to the expression of the textbox. When you will preview the report you can see &quot;Hello All&quot; on the report. That is as far as we are going to take embedded code.&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;b&gt;Custom Assemblies:&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;This is a much more useful feature since you aren&#39;t constrained to writing code in VB.Net on a small dialog in the report designer. The need for custom assemblies lies when we need to write code in such a way that is not possible in the embedded code. e.g. In my code I was trying to use the dynamic connection string for my reports. Firstly i tried to write the code as embedded but that had very limited functionality. So, I used custom asseblies to achieve this. It is not a big deal to write a custom assebly in own way. but the only thing is that we need to cope with the Code Access Security (CAS).&lt;br /&gt;
&lt;br /&gt;
Firstly let me explain you how to create a custom assembly.&lt;br /&gt;
&lt;br /&gt;
1. Open the Visual Studio and Create a Class library project in C# or VB (either of the langauages you are comfortable with). Say it CustomAssembly and rename Class1.cs to MyCustomClass.cs&lt;br /&gt;
2. Write the code in the class file e.g.&lt;br /&gt;
public static string LoadXML(string strenv, string Path)&lt;br /&gt;
{&lt;br /&gt;
XmlDocument xmldoc = new XmlDocument();&lt;br /&gt;
XmlNode node = default(XmlNode);&lt;br /&gt;
string XMLFilePath = Path;&lt;br /&gt;
XmlUrlResolver objResolver = new XmlUrlResolver();&lt;br /&gt;
objResolver.Credentials = CredentialCache.DefaultCredentials;&lt;br /&gt;
xmldoc.XmlResolver = objResolver;&lt;br /&gt;
xmldoc.Load(XMLFilePath);&lt;br /&gt;
if (strenv.ToLower() == &quot;development&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; node = xmldoc.SelectSingleNode(&quot;ConnectionString/Development&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
if (node != null)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; con = node.InnerXml;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
return con;&lt;br /&gt;
}&lt;br /&gt;
3. Now you are done with the code part for the custom assembly.&lt;br /&gt;
4. Copy the assembly from the bin folder to the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies and C:\Program Files\Microsoft SQL Server\MSRS10_50.SQLSERVER2008R2\Reporting Services\ReportServer\bin&lt;br /&gt;
Note: I am using SQLServer 2008 R2 here so my folder is MSRS10_50.SQLSERVER2008R2, please check your folder and place the assembly file there.&lt;br /&gt;
4. The next step is to use this assembly within you SSRS. To acheive this Open Visual Studio and create a new report project and a new report (Right click the project -&amp;gt; Add New Item -&amp;gt; Report). Go to Report menu and click Report Properties.On the references tab, locate the assembly and add the assembly.&lt;br /&gt;
5. On the code tab write the code =CustomAssembly.MyCustomClass.LoadXML(&quot;development&quot;,&quot;some path&quot;)&lt;br /&gt;
&lt;div&gt;This is the last step of custom assembly.&lt;/div&gt;&lt;div&gt;Now comes the Code Access Security part&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Code Access Security&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;This code would not work until we dont have some permissions to run the DLL. The permissions could be IO permissions, environment permissions and security permissions. Add the following lines for the assert permissions.&lt;/div&gt;&lt;div&gt;System.Net.WebPermission webPermission;&lt;br /&gt;
webPermission = new System.Net.WebPermission(System.Net.NetworkAccess.Connect, Path);&lt;br /&gt;
webPermission.Assert();&lt;br /&gt;
&lt;br /&gt;
For security permissions you can use the following method just after the class name.&lt;br /&gt;
&lt;br /&gt;
[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert, Unrestricted = true)]&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Also, we need to change the rssrvpolicy configuration file. This file can be located under the Report server installation folder.&lt;br /&gt;
&lt;br /&gt;
Open the file and add the following code snippet under the code group tag.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;lt;CodeGroup class=&quot;UnionCodeGroup&quot; version=&quot;1&quot; PermissionSetName=&quot;FullTrust&quot; Name=&quot;NewCodeGroup&quot; Description=&quot;A special code group for my custom assembly.&quot;&amp;gt;&lt;br /&gt;
&amp;lt;IMembershipCondition class=&quot;UrlMembershipCondition&quot; version=&quot;1&quot;&amp;nbsp; Url=&quot;C:\Program Files\Microsoft SQL Server\MSRS10_50.SQLSERVER2008R2\Reporting Services\ReportServer\bin\CustomAssembly.dll&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/CodeGroup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code generally provides the Full Trust permission to our custom assembly and enables it to override any permission barrier.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt; &lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Georgia,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vivek-rathore.blogspot.com/feeds/3339778885689548697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vivek-rathore.blogspot.com/2010/12/custom-assembly-in-sql-server-reporting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/3339778885689548697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/326773441607666401/posts/default/3339778885689548697'/><link rel='alternate' type='text/html' href='http://vivek-rathore.blogspot.com/2010/12/custom-assembly-in-sql-server-reporting.html' title='Custom Assembly in Sql Server Reporting Services (SSRS).'/><author><name>Vivek Rathore</name><uri>http://www.blogger.com/profile/10196280553118761014</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEaBp0JOcbSlHdD1tn8A6Kn067RsR4hMYUMBXzWzsZpWdY1D6xsy0Z4u0MV7W498CczTCCes2U6ezuqM8T-CJQmGj4MEC1qhr3j0fii1xS5m5fUxau9weE_jhXbHoW_A/s220/me.JPG'/></author><thr:total>0</thr:total></entry></feed>