<?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>www.kevincornwell.com &#187; Visual Studio</title>
	<atom:link href="http://www.kevincornwell.com/blog/index.php/category/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kevincornwell.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 02 Dec 2010 16:31:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.2</generator>
		<item>
		<title>Break into Debugger when Exception is thrown</title>
		<link>http://www.kevincornwell.com/blog/index.php/break-into-debugger-when-exception-is-thrown/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/break-into-debugger-when-exception-is-thrown/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 20:59:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/index.php/break-into-debugger-when-exception-is-thrown/</guid>
		<description><![CDATA[Break into Debugger when Exception is thrown even if you are using try catch statements. From Visual Studio, hit CTRL + ALT + E. Then check the &#8220;Thrown attribute of the Common Language Runtime Exceptions.]]></description>
			<content:encoded><![CDATA[<p>Break into Debugger when Exception is thrown even if you are using try catch statements.</p>
<p>From Visual Studio, hit <strong>CTRL + ALT + E</strong>.  Then check the &#8220;Thrown attribute of the Common Language Runtime Exceptions.</p>
<p><a href='http://www.kevincornwell.com/blog/wp-content/uploads/2008/03/untitled.GIF' title='untitled.GIF'><img src='http://www.kevincornwell.com/blog/wp-content/uploads/2008/03/untitled.thumbnail.GIF' alt='untitled.GIF' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/break-into-debugger-when-exception-is-thrown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create and populate a simple calendar table in MS SQL</title>
		<link>http://www.kevincornwell.com/blog/index.php/create-and-populate-a-simple-calendar-table-in-ms-sql/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/create-and-populate-a-simple-calendar-table-in-ms-sql/#comments</comments>
		<pubDate>Mon, 18 Dec 2006 03:36:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.kevincornwell.com/blog/index.php/create-and-populate-a-simple-calendar-table-in-ms-sql/</guid>
		<description><![CDATA[Edit as required&#8230; USE master go &#160; IF EXISTS &#40;SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tCalendar'&#41; BEGIN DROP TABLE tCalendar END go &#160; CREATE TABLE tCalendar &#40; DateID INT IDENTITY&#40;1,1&#41; CONSTRAINT tCalendar_PK PRIMARY KEY CLUSTERED, DATE DATETIME, Holiday BIT DEFAULT 0, Workday BIT DEFAULT 0&#41; go CREATE UNIQUE NONCLUSTERED INDEX tCalendar_date_N_Idx ON tCalendar&#40;DATE&#41; go [...]]]></description>
			<content:encoded><![CDATA[<p>Edit as required&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="tsql"><span style="color: #0000FF;">USE</span> master
go
&nbsp;
<span style="color: #0000FF;">IF</span>  EXISTS <span style="color: #808080;">&#40;</span><span style="color: #0000FF;">SELECT</span> * <span style="color: #0000FF;">FROM</span> INFORMATION_SCHEMA.<span style="color: #202020;">TABLES</span> <span style="color: #0000FF;">WHERE</span> TABLE_NAME = <span style="color: #FF0000;">'tCalendar'</span><span style="color: #808080;">&#41;</span>
<span style="color: #0000FF;">BEGIN</span>
<span style="color: #0000FF;">DROP</span> <span style="color: #0000FF;">TABLE</span> tCalendar
<span style="color: #0000FF;">END</span>
go
&nbsp;
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">TABLE</span> tCalendar <span style="color: #808080;">&#40;</span>
DateID <span style="color: #0000FF;">INT</span> <span style="color: #0000FF;">IDENTITY</span><span style="color: #808080;">&#40;</span><span style="color: #000;">1</span>,<span style="color: #000;">1</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">CONSTRAINT</span> tCalendar_PK <span style="color: #0000FF;">PRIMARY</span> <span style="color: #0000FF;">KEY</span> <span style="color: #0000FF;">CLUSTERED</span>,
<span style="color: #0000FF;">DATE</span> <span style="color: #0000FF;">DATETIME</span>,
Holiday <span style="color: #0000FF;">BIT</span> <span style="color: #0000FF;">DEFAULT</span> <span style="color: #000;">0</span>,
Workday <span style="color: #0000FF;">BIT</span> <span style="color: #0000FF;">DEFAULT</span> <span style="color: #000;">0</span><span style="color: #808080;">&#41;</span>
go
<span style="color: #0000FF;">CREATE</span> <span style="color: #0000FF;">UNIQUE</span> <span style="color: #0000FF;">NONCLUSTERED</span> <span style="color: #0000FF;">INDEX</span>
tCalendar_date_N_Idx <span style="color: #0000FF;">ON</span> tCalendar<span style="color: #808080;">&#40;</span><span style="color: #0000FF;">DATE</span><span style="color: #808080;">&#41;</span>
go
&nbsp;
<span style="color: #008080;">--Populate all days</span>
&nbsp;
<span style="color: #0000FF;">DECLARE</span> @n <span style="color: #0000FF;">INT</span>
<span style="color: #0000FF;">DECLARE</span> @maxn <span style="color: #0000FF;">INT</span>
<span style="color: #0000FF;">DECLARE</span> @begindate <span style="color: #0000FF;">DATETIME</span>
<span style="color: #0000FF;">SET</span> @n =<span style="color: #000;">1</span>
<span style="color: #0000FF;">SET</span> @maxn=<span style="color: #000;">36500</span>    <span style="color: #008080;">-- Number of days added to the calendar</span>
<span style="color: #0000FF;">SET</span> @begindate =<span style="color: #0000FF;">CONVERT</span><span style="color: #808080;">&#40;</span><span style="color: #0000FF;">DATETIME</span>,<span style="color: #FF0000;">'01/01/1995'</span><span style="color: #808080;">&#41;</span>
<span style="color: #008080;">-- Initial date for the first run is todays date</span>
<span style="color: #008080;">-- or Jan 1st</span>
<span style="color: #0000FF;">SET</span> @begindate =@begindate <span style="color: #000;">-1</span>
&nbsp;
<span style="color: #0000FF;">WHILE</span> @n &lt;= @maxn
<span style="color: #0000FF;">BEGIN</span>
<span style="color: #0000FF;">INSERT</span> <span style="color: #0000FF;">INTO</span> tCalendar<span style="color: #808080;">&#40;</span><span style="color: #0000FF;">DATE</span><span style="color: #808080;">&#41;</span> <span style="color: #0000FF;">SELECT</span> @begindate+@n
<span style="color: #0000FF;">SET</span> @n=@n<span style="color: #000;">+1</span>
<span style="color: #0000FF;">END</span>
&nbsp;
<span style="color: #008080;">--update the holiday and workday flags</span>
&nbsp;
go
<span style="color: #0000FF;">UPDATE</span> tCalendar
<span style="color: #0000FF;">SET</span> holiday=<span style="color: #000;">1</span> <span style="color: #0000FF;">WHERE</span> <span style="color: #FF00FF;">DATENAME</span><span style="color: #808080;">&#40;</span>dw,<span style="color: #0000FF;">DATE</span><span style="color: #808080;">&#41;</span> in <span style="color: #808080;">&#40;</span><span style="color: #FF0000;">'Saturday'</span>,<span style="color: #FF0000;">'Sunday'</span><span style="color: #808080;">&#41;</span>
go
<span style="color: #0000FF;">UPDATE</span> tCalendar
<span style="color: #0000FF;">SET</span> workday=<span style="color: #000;">1</span> <span style="color: #0000FF;">WHERE</span> holiday=<span style="color: #000;">0</span>
go
&nbsp;
<span style="color: #0000FF;">SELECT</span> * <span style="color: #0000FF;">FROM</span> tCalendar</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/create-and-populate-a-simple-calendar-table-in-ms-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio Syntax Highlighting and Intellisense for Classic ASP</title>
		<link>http://www.kevincornwell.com/blog/index.php/visual-studio-classic-asp-syntax-highlighting-and-intellisense/</link>
		<comments>http://www.kevincornwell.com/blog/index.php/visual-studio-classic-asp-syntax-highlighting-and-intellisense/#comments</comments>
		<pubDate>Wed, 05 Apr 2006 17:58:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kevincornwell.com/wordpress/?p=19</guid>
		<description><![CDATA[With the new release of Visual Studio (VS) 2005, you would think that it would have full support for classic ASP when working in a directory. This is not the case. There are some hacks out there, however none are fully functional and some require that you set the page directive on every page you [...]]]></description>
			<content:encoded><![CDATA[<p>With the new release of Visual Studio (VS) 2005, you would think that it would have full support for classic ASP when working in a directory.  This is not the case.  There are some hacks out there, however none are fully functional and some require that you set the page directive on every page you want highlighting and intellisense. Of course this will  break some of your pages.</p>
<p>For those who want the power of VS (mainly Intellisense), you still need to use vs 2003 until MS makes a fully functional .asp template for VS 2005.</p>
<p>This tutorial will walk you through the process of creating a Solution that allows you to edit your classic ASP in VS 2003.  The site must be accessible though windows explorer (C:\ or mapped drives).</p>
<ol>
<li>Start VS 2003</li>
<li>File > New > Blank Solution</li>
<li>Name it &#8220;Classic ASP&#8221; or whatever.  The location is where the link will be stored for opening the solution and all it&#8217;s projects.</li>
<li>Add your sites&#8230;</li>
<li>Right Click the Solution &#8220;Classic ASP&#8221;</li>
<li>Add > New Project > Visual Basic Projects > New Project In Existing Folder</li>
<li>Name it &#8220;My ASP Site 1&#8243;</li>
<li>Click Ok</li>
<li>Browse to the location of the root folder for that web site.</li>
<li>Single click the project.  From the VS menu bar, click Project > Show all Files (or click the second button in the solution Explorer)</li>
<li>Repeat for all your sites/directories.</li>
</ol>
<p><br/><br />
Now when you start the solution, all the sites and files will be listed from within VS 2003.  You now have html, javascript, and vbscript intellisense.  You also get param lists when you call functions/subs that are on the same working page.  Sweet!</p>
<p><strong>Notes</strong>:</p>
<ul>
<li>VS will create a couple of files in the project directories (bin folder, .vbproj, .vbproj.user) .  They are harmless and a small price to pay for the power of VS.</li>
<li>You may get a warning about a project not being fully trusted by the .NET runtime.  That&#8217;s ok, we are not using .NET here anyway.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kevincornwell.com/blog/index.php/visual-studio-classic-asp-syntax-highlighting-and-intellisense/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

