<?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>Brandon&#039;s Blog &#187; ASP</title>
	<atom:link href="http://brandondavie.com/tag/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://brandondavie.com</link>
	<description>The random ramblings and thoughts of a technology enthusiast</description>
	<lastBuildDate>Mon, 31 Aug 2009 03:20:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>It&#8217;s a Programmer Thing</title>
		<link>http://brandondavie.com/its-a-programmer-thing/34/</link>
		<comments>http://brandondavie.com/its-a-programmer-thing/34/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 01:03:17 +0000</pubDate>
		<dc:creator>Brandon</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://brandondavie.com/?p=34</guid>
		<description><![CDATA[One of the more time consuming portions of the project I&#8217;m currently undertaking is revamping several online forms for use between three schools. Forms like purchase requests, maintenance requests, paid leave of absence, the standard vanilla stuff you see with any organization. I had actually written the first incarnation of these forms back in high [...]]]></description>
			<content:encoded><![CDATA[<p>One of the more time consuming portions of the project I&#8217;m currently undertaking is revamping several online forms for use between three schools. Forms like purchase requests, maintenance requests, paid leave of absence, the standard vanilla stuff you see with any organization. I had actually written the first incarnation of these forms back in high school, August 2006 to be exact (assuming I didn&#8217;t lie on the website). I used a combination of classic ASP and a Microsoft Access database. Yes, you heard right, an Access database. I actually had access to a MSSQL install but, seeing how I was still relatively new to ASP and databases in general, the thought probably never crossed my mind. It wasn&#8217;t until later when I started running into &#8220;Unspecified errors&#8221; and performance issues when I started regretting this decision.</p>
<p>Up until recently, the forms were running great &#8211; then the RAID array they were hosted on went south. The server admin wasn&#8217;t running backups so I thought I had lost them for good &#8211; but fortunately I managed to find an old archived backup from 2007 on a file server. Tonight I took a peek at the source for the first time in years and, after expecting to grimace at the sight of it, was surprisingly intrigued. It was one of my first &#8220;real&#8221; websites so I think I have more of a nostalgic connection to it than any other project I&#8217;ve taken on. When I see code like this,</p>

<div class="wp_syntax"><div class="code"><pre class="asp" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">Dim</span> Conn, ConStr
<span style="color: #990099; font-weight: bold;">Set</span> Conn <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">CreateObject</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;ADODB.Connection&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color: #008000;">'Create the connection to the access database</span>
ConStr <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=&quot;</span>
ConStr <span style="color: #006600; font-weight: bold;">=</span> ConStr <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #990099; font-weight: bold;">Server</span>.<span style="color: #330066;">MapPath</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;/WWW2.mdb&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
&nbsp;
Conn.<span style="color: #9900cc;">Mode</span> <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #800000;">3</span>
Conn.<span style="color: #330066;">Open</span> Constr
&nbsp;
<span style="color: #008000;">' Create TicketID</span>
CurDay <span style="color: #006600; font-weight: bold;">=</span> Right<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;00&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #330066;">day</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">now</span><span style="color: #006600; font-weight:bold;">&#41;</span>,<span style="color: #800000;">2</span><span style="color: #006600; font-weight:bold;">&#41;</span>
CurDay <span style="color: #006600; font-weight: bold;">=</span> CurDay <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #330066;">Ucase</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">MonthName</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">month</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">now</span><span style="color: #006600; font-weight:bold;">&#41;</span>, <span style="color: #0000ff; font-weight: bold;">true</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> Right<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">year</span><span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #330066;">now</span><span style="color: #006600; font-weight:bold;">&#41;</span>,<span style="color: #800000;">2</span><span style="color: #006600; font-weight:bold;">&#41;</span>	
&nbsp;
sqlGetTicketNo <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;SELECT MAX(Ticket_ID)AS TNUM FROM Tickets WHERE (((Ticket_ID) LIKE '%&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> CurDay <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;'))&quot;</span>
&nbsp;
<span style="color: #990099; font-weight: bold;">Set</span> rsGetTicketNo <span style="color: #006600; font-weight: bold;">=</span> Conn.<span style="color: #330066;">Execute</span><span style="color: #006600; font-weight:bold;">&#40;</span>sqlGetTicketNo<span style="color: #006600; font-weight:bold;">&#41;</span>
<span style="color: #990099; font-weight: bold;">IF</span> isNULL<span style="color: #006600; font-weight:bold;">&#40;</span>rsGetTicketNo<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;TNUM&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #990099; font-weight: bold;">Then</span>
 GetTicketNo <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;0001-&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> CurDay
<span style="color: #990099; font-weight: bold;">ELSE</span>
 CurTicketNo <span style="color: #006600; font-weight: bold;">=</span> rsGetTicketNo<span style="color: #006600; font-weight:bold;">&#40;</span><span style="color: #cc0000;">&quot;TNUM&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
 NewTicketNo <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #330066;">trim</span><span style="color: #006600; font-weight:bold;">&#40;</span>left<span style="color: #006600; font-weight:bold;">&#40;</span>CurTicketNo,<span style="color: #330066;">instr</span><span style="color: #006600; font-weight:bold;">&#40;</span>CurTicketNo, <span style="color: #cc0000;">&quot;-&quot;</span><span style="color: #006600; font-weight:bold;">&#41;</span>-<span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span><span style="color: #006600; font-weight:bold;">&#41;</span>
 NewTicketNo <span style="color: #006600; font-weight: bold;">=</span> <span style="color: #cc0000;">&quot;00000&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #006600; font-weight:bold;">&#40;</span>NewTicketNo + <span style="color: #800000;">1</span><span style="color: #006600; font-weight:bold;">&#41;</span>
 GetTicketNo <span style="color: #006600; font-weight: bold;">=</span> Right<span style="color: #006600; font-weight:bold;">&#40;</span>NewTicketNo,<span style="color: #800000;">4</span><span style="color: #006600; font-weight:bold;">&#41;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> <span style="color: #cc0000;">&quot;-&quot;</span> <span style="color: #006600; font-weight: bold;">&amp;</span> CurDay
<span style="color: #990099; font-weight: bold;">End</span> <span style="color: #990099; font-weight: bold;">IF</span>
rsGetTicketNo.<span style="color: #330066;">Close</span></pre></div></div>

<p>Not only does it make me wonder what I was thinking to come up with a mess like that, but it also brings back somewhat fond memories of late nights with Google and brief cursing.</p>
<p>But, I digress. What seems to be plain old boring code to you oddly strikes me as meaningful. Perhaps it&#8217;s just a programmer thing? A certain attachment to our first creations? As it turns out, as far as web languages go, I did not continue on much with ASP. I dabbled a bit with ASP.NET, but eventually moved towards PHP at the persuasion of a few friends and the need to learn it in order to understand and modify IP.Board. I imagine the next couple of weeks will be amusing as I take a closer look at some of the forms I wrote while I port them over to my PHP framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://brandondavie.com/its-a-programmer-thing/34/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
