<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>Marcus's Musings</title>
<link>http://marcustucker.com/blogold/default.asp</link>
<description>Thoughts and advice on ASP classic</description>
<language>en</language>
<copyright>Copyright 2004, Marcus Tucker</copyright>
<managingEditor>blog@marcustucker.com</managingEditor>
<lastBuildDate>Fri, 30 Apr 2004 01:11:46 GMT</lastBuildDate>
<generator>BlogWorks XML v1.2.0 Beta 3</generator>
<docs>http://backend.userland.com/rss</docs>
<ttl>60</ttl>

<item>
<title>Changing over...</title>
<link>http://marcustucker.com/blogold/200404archive001.asp#1082807351001</link>
<description>&lt;p&gt;I'm switching to &lt;a href=&quot;http://www.uapplication.com/&quot; target=&quot;_blank&quot;&gt;UApplication's&lt;/a&gt; blogging app &lt;a href=&quot;http://www.uapplication.com/ublogreload.asp&quot; target=&quot;_blank&quot;&gt;UBlog Reload&lt;/a&gt; this weekend (probably later tomorrow), so I thought I should give a heads-up that the URL of this blog (and the RSS feed) will be changing - they will be:&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://blog.marcustucker.com&quot; target=&quot;_blank&quot;&gt;http://blog.marcustucker.com&lt;/a&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=&quot;http://blog.marcustucker.com/rss2.asp&quot; target=&quot;_blank&quot;&gt;http://blog.marcustucker.com/rss2.asp&lt;/a&gt;&lt;/li&gt;&lt;/p&gt;&lt;p&gt;Once the changeover occurs, the old RSS URL will stop working, so please add the new one to your RSS aggregator now (although it won't work for now), and delete the old one when it dies. Incidentally, the new RSS feed will support carious parameters for recent posts, categories, etc. so that you can tailor the feed to suit you. It'll be self-explanatory once the blogs have been switched.&lt;/p&gt;&lt;p&gt;Finally, please note that because of the way my host implements subdomains, you will find that the current old URL will still work, but beware that some links and/or images could get mangled, so it's best that you access the new blog using the new URL. I'll be changing my sigs on various forums appropriately.&lt;/p&gt;&lt;p&gt;Thanks for bearing with me during this changeover.&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200404archive001.asp#1082807351001</guid>
<pubDate>Sat, 24 Apr 2004 11:49:11 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1082807351001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1082807351001</wfw:comment>
</item>

<item>
<title>SQL Server output to XML</title>
<link>http://marcustucker.com/blogold/200404archive001.asp#1082029598001</link>
<description>&lt;p&gt;And here's another helpful function that I wrote yesterday...&lt;br /&gt;&lt;pre&gt;Function ExecuteXMLQuery(ByRef Connection, ByRef SQL, ByVal RootNodeName)&lt;br /&gt;	Dim Command, Stream&lt;br /&gt;	Set Command = Server.CreateObject(&quot;ADODB.Command&quot;)&lt;br /&gt;	&lt;br /&gt;	Set Stream = Server.CreateObject(&quot;ADODB.Stream&quot;)&lt;br /&gt;	Stream.Type = 2 'adTypeText&lt;br /&gt;	Stream.Open&lt;br /&gt;	&lt;br /&gt;	Command.ActiveConnection = Connection&lt;br /&gt;	Command.Dialect = &quot;{5D531CB2-E6Ed-11D2-B252-00C04F681B71}&quot;&lt;br /&gt;	&lt;br /&gt;	Command.CommandText = &quot;&amp;lt;&quot; &amp; RootNodeName &amp; &quot; xmlns:sql='urn:schemas-microsoft-com:xml-sql'&amp;gt;&quot; &amp; _&lt;br /&gt;	&quot;&amp;lt;sql:query&amp;gt;&quot; &amp; _&lt;br /&gt;	SQL &amp; _&lt;br /&gt;	&amp;lt;/sql:query&amp;gt;&quot; &amp; _&lt;br /&gt;	&quot;&amp;lt;/&quot; &amp; RootNodeName &amp; &quot;&amp;gt;&quot;&lt;br /&gt;	&lt;br /&gt;	Command.Properties(&quot;Output Stream&quot;) = Stream&lt;br /&gt;	Command.Execute , , 1024 'adExecuteStream&lt;/p&gt;&lt;p&gt;	Stream.Position = 0&lt;br /&gt;	ExecuteXMLQuery = Stream.ReadText(-1)&lt;br /&gt;	&lt;br /&gt;	Set Stream = Nothing&lt;br /&gt;	Set Command = Nothing&lt;br /&gt;End Function&lt;/pre&gt;Simply pass an active SQL Server 2000 connection, an SQL statement like &quot;SELECT Customer.ID, Customer.Name, Order.ID, Order.TotalQuantity, Order.TotalValue FROM tblCustomers AS Customer LEFT JOIN tblOrders AS Order ON Order.CustomerID = Customer.ID FOR XML AUTO, ELEMENTS&quot;, and a suitable root element name (e.g. &quot;CustomerOrders&quot;) to get an XML document (as a text string) in response, ready for transforming, storing, sending, etc.&lt;/p&gt;&lt;p&gt;You might prefer to receive an XML DOM instead, in which case you can easily modify the above function and make the Command object populate a DOM object directly without using the Stream object.&lt;/p&gt;&lt;p&gt;In fact, now I've written that, I'm tempted to add an extra parameter to the function to produce either output as required! But I'm not going to post it... you can do it yourself! :p&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200404archive001.asp#1082029598001</guid>
<pubDate>Thu, 15 Apr 2004 11:46:38 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1082029598001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1082029598001</wfw:comment>
</item>

<item>
<title>Kludge alert!</title>
<link>http://marcustucker.com/blogold/200404archive001.asp#1082024959001</link>
<description>&lt;p&gt;I've got fed up with the font-size problems in these posts (largely due to poorly-formed HTML being generated by the blog app), so I've applied fixed-pixel font sizes as a workaround, and it seems to be fine. I'm almost definitely going to move to another blog app - UBlog from &lt;a href=&quot;http://www.uapplication.com&quot; target=&quot;_blank&quot;&gt;www.uapplication.com&lt;/a&gt; looks promising... is anyone running it? Otherwise I might go to TextPattern or MoveableType...&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200404archive001.asp#1082024959001</guid>
<pubDate>Thu, 15 Apr 2004 10:29:19 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1082024959001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1082024959001</wfw:comment>
</item>

<item>
<title>MSXML hints &amp; tips</title>
<link>http://marcustucker.com/blogold/200404archive001.asp#1082024194001</link>
<description>&lt;p&gt;I'm about to sit down and write a dynamic XML-based navigation system for a new web app at work, and I thought I'd share a few handy tips about MSXML:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Ensure that you're using the latest version of the Microsoft XML Parser (currently &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyID=3144b72b-b4f2-46da-b4b6-c5d7485f2b42&amp;DisplayLang=en&quot; target=&quot;_blank&quot;&gt;4.0 SP2&lt;/a&gt;) unless there's a very good reason, since there were &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnexxml/html/xml03202000.asp&quot; target=&quot;_blank&quot;&gt;significant performance improvements between v2 and v3&lt;/a&gt;, and no doubt plenty more in v4 (although naturally in all cases you will only reap most of speed gains if you are aware of and use the new objects provided - see the documentation installed along with the parser). Naturally there are probably plenty of bugfixes too.&lt;/li&gt;&lt;/p&gt;&lt;p&gt;&lt;li&gt;You should also be explicitly specifying the version number when creating instances of the objects. This should always be done to ensure that an error is thrown if the correct version isn't installed, instead of dropping down to the highest version installed (e.g. 3), since doing so might cause odd problems which are rather hard to fathom until the penny drops and you realise that an older version is being used instead! For example:&lt;br /&gt;&lt;pre&gt;Set XMLDOM = Server.CreateObject(&quot;MSXML2.DOMDocument.4.0&quot;)&lt;/pre&gt;&lt;/li&gt;&lt;/p&gt;&lt;p&gt;&lt;li&gt;Make use of Application-level DOM caching for huge speed gains (when frequently manipulating/transforming the same XML documents) by using a free-threaded DOM object. Here's a little something I've whipped up to make life easy (if you have any problems/question, simply post a comment):&lt;br /&gt;&lt;pre&gt;Function GetCachedXMLDOM(FilePath)&lt;br /&gt;	If IsObject(Application(FilePath)) Then&lt;br /&gt;		'Load from cache&lt;br /&gt;		Set GetCachedXMLDOM = Application(FilePath)&lt;br /&gt;	Else&lt;br /&gt;		'Load from disk&lt;br /&gt;		Set GetCachedXMLDOM = Server.CreateObject(&quot;MSXML2.FreeThreadedDOMDocument.4.0&quot;)&lt;br /&gt;		GetCachedXMLDOM.Load(FilePath)&lt;br /&gt;		Application.Lock&lt;br /&gt;		Set Application(FilePath) = GetCachedXMLDOM&lt;br /&gt;		Application.UnLock&lt;br /&gt;	End If&lt;br /&gt;End Function&lt;/p&gt;&lt;p&gt;&lt;br /&gt;'example usage follows...&lt;/p&gt;&lt;p&gt;Set MenuXMLDOM = GetCachedXMLDOM(Server.MapPath(&quot;menu.xml&quot;))&lt;/p&gt;&lt;p&gt;Response.Write Replace(Server.HTMLEncode(MenuXMLDOM.DocumentElement.XML),vbCRLF,&quot;&amp;lt;br /&amp;gt;&quot;)&lt;/pre&gt;&lt;/li&gt;&lt;/p&gt;&lt;p&gt;&lt;li&gt;The same technique may be applied to XSLT (stylesheets) and XSD (schemas) by using the &lt;b&gt;Msxml2.XSLTemplate.4.0&lt;/b&gt; and &lt;b&gt;Msxml2.XMLSchemaCache.4.0&lt;/b&gt; objects, since they are both free-threaded (see the docs).&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;That's all for now! On with the coding!&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200404archive001.asp#1082024194001</guid>
<pubDate>Thu, 15 Apr 2004 10:16:34 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1082024194001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1082024194001</wfw:comment>
</item>

<item>
<title>And another thing (or three)</title>
<link>http://marcustucker.com/blogold/200404archive001.asp#1081869771001</link>
<description>&lt;p&gt;I should have mentioned that you can (and *should*) read up on the ADODB.Stream object in your ADO documentation, which you can download as part of the ADO SDK, or &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdobjstream.asp&quot; target=&quot;_blank&quot;&gt;view online in the MSDN library&lt;/a&gt;. I'm sure I saw a good article about Stream vs FSO a while ago, but can't track it down at present.&lt;/p&gt;&lt;p&gt;Similarly, instead of using manual procedures for CSV (or otherwise delimited) files, you should be using the JET OLEDB driver to manipulate it directly - for more on this topic, check out the recent MSDN article &quot;&lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnclinic/html/scripting03092004.asp&quot; target=&quot;_blank&quot;&gt;Much ADO About Text Files&lt;/a&gt;&quot;.&lt;/p&gt;&lt;p&gt;And since I've just been looking at some of my old code which uses it, I thought I'd quickly draw attention to one of the Scripting.Dictionary's lesser-known properties - in a nutshell, it has a &lt;b&gt;.CompareMode&lt;/b&gt; property, which lets you alter its case sensitivity in a couple of subtly different ways.&lt;/p&gt;&lt;p&gt;See the &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jsprocompareMode.asp&quot; target=&quot;_blank&quot;&gt;online MSDN documentation&lt;/a&gt; for the full lowdown. Because of a help authoring mess-up, this property doesn't *appear* to be in the &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&amp;displaylang=en&quot; target=&quot;_blank&quot;&gt;downloadable windows scripting 5.6 documentation&lt;/a&gt; that I'm forever referring people to, but it actually is there - it's merely in the wrong place! Find it &lt;b&gt;Script Runtime -- FileSystem Object -- Reference -- Properties&lt;/b&gt; instead (or search for it).&lt;/p&gt;&lt;p&gt;Finally, &lt;a href=&quot;http://www.atgconsulting.com/aspstandards.asp&quot; target=&quot;_blank&quot;&gt;here's a good page about ASP/VBScript coding standards and best practices&lt;/a&gt; that I found by accident the other day. It's (pretty much) spot on in my book and a highly recommended read to those wishing to improve their technique.&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200404archive001.asp#1081869771001</guid>
<pubDate>Tue, 13 Apr 2004 15:22:51 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1081869771001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1081869771001</wfw:comment>
</item>

<item>
<title>Binary file streaming (aka &quot;dynamic downloads&quot;)</title>
<link>http://marcustucker.com/blogold/200404archive001.asp#1081202785001</link>
<description>&lt;p&gt;Here's a binary file streaming function (and supporting code) that I wrote quite some time ago to make implementing dynamic download functionality almost effortless. I originally posted the first version of this code way back in 2002, in &lt;a href=&quot;http://www.sitepoint.com/forums/showthread.php?threadid=65837&quot; target=&quot;_blank&quot;&gt;this thread @ SPF&lt;/a&gt;, and then it came up again in &lt;a href=&quot;http://www.sitepoint.com/forums/showthread.php?t=67307&quot; target=&quot;_blank&quot;&gt;this one&lt;/a&gt;, by which time I'd refined it a little. I recommend that you read both threads to see the context that it is intended to be used in, as well as a few helpful comments from myself and others.&lt;/p&gt;&lt;p&gt;Incidentally, I use the ADO.Stream object instead of the FSO (FileSystem Object) because the latter is horribly inefficient and totally unsuitable for manipulation of binary data (although it can be done). ADO.Stream is highly optimized for fast IO, and will happily whizz through even *huge* files (i.e. tens or perhaps even hundreds of megabytes in size) with the lowest possible server load.&lt;/p&gt;&lt;p&gt;So anyway, here it is. I hope you find it useful. Let me know if you have any problems.&lt;pre&gt;'Load a file from disk&lt;br /&gt;Function LoadStream(FilePath)&lt;br /&gt;	Dim objStream&lt;/p&gt;&lt;p&gt;	Set objStream = Server.CreateObject(&quot;ADODB.Stream&quot;)&lt;/p&gt;&lt;p&gt;	objStream.Type = 1 'adTypeBinary=1&lt;br /&gt;	objStream.Open&lt;/p&gt;&lt;p&gt;	objStream.LoadFromFile FilePath&lt;br /&gt;	LoadStream = objStream.Read&lt;br /&gt;	&lt;br /&gt;	objStream.Close&lt;br /&gt;	Set objStream = Nothing&lt;br /&gt;End Function&lt;/p&gt;&lt;p&gt;&lt;br /&gt;'returns the MIME header type for a given extension&lt;br /&gt;Function GetMIMEType(Extension)&lt;br /&gt;	dim Ext&lt;br /&gt;	Ext = UCase(Extension)&lt;br /&gt;	&lt;br /&gt;	select case Ext&lt;/p&gt;&lt;p&gt;		'Common documents&lt;br /&gt;		case &quot;TXT&quot;, &quot;TEXT&quot;, &quot;JS&quot;, &quot;VBS&quot;, &quot;ASP&quot;, &quot;CGI&quot;, &quot;PL&quot;, &quot;NFO&quot;, &quot;ME&quot;, &quot;DTD&quot;&lt;br /&gt;			sMIME = &quot;text/plain&quot;&lt;br /&gt;		case &quot;HTM&quot;, &quot;HTML&quot;, &quot;HTA&quot;, &quot;HTX&quot;, &quot;MHT&quot;&lt;br /&gt;			sMIME = &quot;text/html&quot;&lt;br /&gt;		case &quot;CSV&quot;&lt;br /&gt;			sMIME = &quot;text/comma-separated-values&quot;&lt;br /&gt;		case &quot;JS&quot;&lt;br /&gt;			sMIME = &quot;text/javascript&quot;&lt;br /&gt;		case &quot;CSS&quot;&lt;br /&gt;			sMIME = &quot;text/css&quot;&lt;br /&gt;		case &quot;PDF&quot;&lt;br /&gt;			sMIME = &quot;application/pdf&quot;&lt;br /&gt;		case &quot;RTF&quot;&lt;br /&gt;			sMIME = &quot;application/rtf&quot;&lt;br /&gt;		case &quot;XML&quot;, &quot;XSL&quot;, &quot;XSLT&quot;&lt;br /&gt;			sMIME = &quot;text/xml&quot;&lt;br /&gt;		case &quot;WPD&quot;&lt;br /&gt;			sMIME = &quot;application/wordperfect&quot;&lt;br /&gt;		case &quot;WRI&quot;&lt;br /&gt;			sMIME = &quot;application/mswrite&quot;&lt;br /&gt;		case &quot;XLS&quot;, &quot;XLS3&quot;, &quot;XLS4&quot;, &quot;XLS5&quot;, &quot;XLW&quot;&lt;br /&gt;			sMIME = &quot;application/msexcel&quot;&lt;br /&gt;		case &quot;DOC&quot;&lt;br /&gt;			sMIME = &quot;application/msword&quot;&lt;br /&gt;		case &quot;PPT&quot;,&quot;PPS&quot;&lt;br /&gt;			sMIME = &quot;application/mspowerpoint&quot;&lt;br /&gt;		&lt;br /&gt;		'WAP/WML files	&lt;br /&gt;		case &quot;WML&quot;&lt;br /&gt;			sMIME = &quot;text/vnd.wap.wml&quot;&lt;br /&gt;		case &quot;WMLS&quot;&lt;br /&gt;			sMIME = &quot;text/vnd.wap.wmlscript&quot;&lt;br /&gt;		case &quot;WBMP&quot;&lt;br /&gt;			sMIME = &quot;image/vnd.wap.wbmp&quot;&lt;br /&gt;		case &quot;WMLC&quot;&lt;br /&gt;			sMIME = &quot;application/vnd.wap.wmlc&quot;&lt;br /&gt;		case &quot;WMLSC&quot;&lt;br /&gt;			sMIME = &quot;application/vnd.wap.wmlscriptc&quot;&lt;br /&gt;			&lt;br /&gt;		'Images&lt;br /&gt;		case &quot;GIF&quot;&lt;br /&gt;			sMIME = &quot;image/gif&quot;&lt;br /&gt;		case &quot;JPG&quot;, &quot;JPE&quot;, &quot;JPEG&quot;&lt;br /&gt;			sMIME = &quot;image/jpeg&quot;&lt;br /&gt;		case &quot;PNG&quot;&lt;br /&gt;			sMIME = &quot;image/png&quot;&lt;br /&gt;		case &quot;BMP&quot;&lt;br /&gt;			sMIME = &quot;image/bmp&quot;&lt;br /&gt;		case &quot;TIF&quot;,&quot;TIFF&quot;&lt;br /&gt;			sMIME = &quot;image/tiff&quot;&lt;br /&gt;		case &quot;AI&quot;,&quot;EPS&quot;,&quot;PS&quot;&lt;br /&gt;			sMIME = &quot;application/postscript&quot;&lt;br /&gt;			&lt;br /&gt;		'Sound files&lt;br /&gt;		case &quot;AU&quot;,&quot;SND&quot;&lt;br /&gt;			sMIME = &quot;audio/basic&quot;&lt;br /&gt;		case &quot;WAV&quot;&lt;br /&gt;			sMIME = &quot;audio/wav&quot;&lt;br /&gt;		case &quot;RA&quot;,&quot;RM&quot;,&quot;RAM&quot;&lt;br /&gt;			sMIME = &quot;audio/x-pn-realaudio&quot;&lt;br /&gt;		case &quot;MID&quot;,&quot;MIDI&quot;&lt;br /&gt;			sMIME = &quot;audio/x-midi&quot;&lt;br /&gt;		case &quot;MP3&quot;&lt;br /&gt;			sMIME = &quot;audio/mp3&quot;&lt;br /&gt;		case &quot;M3U&quot;&lt;br /&gt;			sMIME = &quot;audio/m3u&quot;&lt;br /&gt;			&lt;br /&gt;		'Video/Multimedia files&lt;br /&gt;		case &quot;ASF&quot;&lt;br /&gt;			sMIME = &quot;video/x-ms-asf&quot;&lt;br /&gt;		case &quot;AVI&quot;&lt;br /&gt;			sMIME = &quot;video/avi&quot;&lt;br /&gt;		case &quot;MPG&quot;,&quot;MPEG&quot;&lt;br /&gt;			sMIME = &quot;video/mpeg&quot;&lt;br /&gt;		case &quot;QT&quot;,&quot;MOV&quot;,&quot;QTVR&quot;&lt;br /&gt;			sMIME = &quot;video/quicktime&quot;&lt;br /&gt;		case &quot;SWA&quot;&lt;br /&gt;			sMIME = &quot;application/x-director&quot;&lt;br /&gt;		case &quot;SWF&quot;&lt;br /&gt;			sMIME = &quot;application/x-shockwave-flash&quot;&lt;/p&gt;&lt;p&gt;		'Compressed/archives&lt;br /&gt;		case &quot;ZIP&quot;&lt;br /&gt;			sMIME = &quot;application/x-zip-compressed&quot;&lt;br /&gt;		case &quot;GZ&quot;&lt;br /&gt;			sMIME = &quot;application/x-gzip&quot;&lt;br /&gt;		case &quot;RAR&quot;&lt;br /&gt;			sMIME = &quot;application/x-rar-compressed&quot;&lt;br /&gt;			&lt;br /&gt;		'Miscellaneous&lt;br /&gt;		case &quot;COM&quot;,&quot;EXE&quot;,&quot;DLL&quot;,&quot;OCX&quot;&lt;br /&gt;			sMIME = &quot;application/octet-stream&quot;&lt;br /&gt;			&lt;br /&gt;		'Unknown (send as binary stream)&lt;br /&gt;		case else&lt;br /&gt;			sMIME = &quot;application/octet-stream&quot;&lt;br /&gt;	end select&lt;br /&gt;	&lt;br /&gt;	GetMimeType = sMIME&lt;br /&gt;End Function&lt;/p&gt;&lt;p&gt;&lt;br /&gt;'Sends the specified file to the browser&lt;br /&gt;sub SendStreamToBrowser(FileStream, FileName, ContentType, IsInline)&lt;br /&gt;	Dim FileExt, FileSize&lt;br /&gt;	&lt;br /&gt;	'Disable error checking&lt;br /&gt;	on error resume next&lt;/p&gt;&lt;p&gt;	'Clear buffer&lt;br /&gt;	Response.Clear&lt;br /&gt;	&lt;br /&gt;	FileExt = mid(FileExt, instrrev(FileName,&quot;.&quot;) + 1)&lt;br /&gt;	FileSize = Ubound(FileStream) + 1&lt;br /&gt;		&lt;br /&gt;	'Add filename to header&lt;br /&gt;	Response.AddHeader &quot;Connection&quot;, &quot;keep-alive&quot;&lt;br /&gt;	Response.AddHeader &quot;Content-Length&quot;, FileSize&lt;br /&gt;	&lt;br /&gt;	'Check if data should be delivered inline or not&lt;br /&gt;	If IsInline = True then&lt;br /&gt;		'Allow the browser to render the file inside a browser window (if it can)&lt;br /&gt;		Response.AddHeader &quot;Content-Disposition&quot;,&quot;inline; filename=&quot; &amp; FileName&lt;br /&gt;	Else&lt;br /&gt;		'Force browser to save file&lt;br /&gt;		Response.AddHeader &quot;Content-Disposition&quot;,&quot;attachment; filename=&quot;&quot;&quot; &amp; FileName &amp; &quot;&quot;&quot;&quot;&lt;br /&gt;	End If&lt;br /&gt;	&lt;br /&gt;	'Get ContentType for download&lt;br /&gt;	select case ContentType&lt;br /&gt;		case false&lt;br /&gt;			'Generic binary ContentType and Charset&lt;br /&gt;			Response.ContentType = &quot;application/octet-stream&quot;&lt;br /&gt;			Response.Charset = &quot;UTF-8&quot;&lt;br /&gt;			&lt;br /&gt;		case &quot;&quot;&lt;br /&gt;			'Find out what it should be&lt;br /&gt;			Response.ContentType = GetMIMEType(FileExt)&lt;br /&gt;		&lt;br /&gt;		case else&lt;br /&gt;			'Use the ContentType that was passed&lt;br /&gt;			Response.ContentType = ContentType&lt;br /&gt;	end select&lt;/p&gt;&lt;p&gt;	'Send data to client&lt;br /&gt;	Response.BinaryWrite(FileStream)&lt;br /&gt;	Response.Flush&lt;br /&gt;End Sub&lt;/pre&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200404archive001.asp#1081202785001</guid>
<pubDate>Mon, 05 Apr 2004 22:06:25 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1081202785001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1081202785001</wfw:comment>
</item>

<item>
<title>Blogbits</title>
<link>http://marcustucker.com/blogold/200404archive001.asp#1081199872001</link>
<description>&lt;p&gt;&lt;a href=&quot;http://midnightspaghetti.com/news.htm&quot; target=&quot;_blank&quot;&gt;American ATM machines&lt;/a&gt;... they inspire confidence! (Apparently was /.'d last month, but I only just noticed it)&lt;/p&gt;&lt;p&gt;And following on from an interesting thread about teaching yourself to program that was going on at Sitepoint forums last month, I found a &lt;a href=&quot;http://norvig.com/21-days.html&quot; target=&quot;_blank&quot;&gt;great page&lt;a/&gt; which talks about what's wrong with SO MANY programming books out there.&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200404archive001.asp#1081199872001</guid>
<pubDate>Mon, 05 Apr 2004 21:17:52 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1081199872001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1081199872001</wfw:comment>
</item>

<item>
<title>When will I ever learn?!</title>
<link>http://marcustucker.com/blogold/200404archive001.asp#1081196853001</link>
<description>&lt;p&gt;I seem to keep making promises to post stuff but completely failing to because I never get round to it... and posting completely different stuff, like &lt;a href=&quot;http://blog.topix.net/archives/000016.html&quot; target=&quot;_blank&quot;&gt;this very interesting blog post about the technology that powers Google&lt;/a&gt;. Found that at &lt;a href=&quot;http://simon.incutio.com/&quot; target=&quot;_blank&quot;&gt;Simon Willison's excellent blog&lt;/a&gt;... who found it somewhere else... and so on... and so forth. Make sure you also read &lt;a href=&quot;http://the.taoofmac.com/space/blog/2004-04-02&quot; target=&quot;_blank&quot;&gt;this related blog post&lt;/a&gt; mentioned in the comments.&lt;/p&gt;&lt;p&gt;I'm busy packing for a business trip to Germany at the moment, but I will try my damndest to catch up on my broken blog promises before I leave tomorrow morning. But that's not a promise! :p&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200404archive001.asp#1081196853001</guid>
<pubDate>Mon, 05 Apr 2004 20:27:33 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1081196853001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1081196853001</wfw:comment>
</item>

<item>
<title>Back in town</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1080735106001</link>
<description>&lt;p&gt;I arrived back home on Monday and started back at work today. I'll post some snaps and work through my to-do list (see previous post) as soon as I have a moment, so if you're waiting for more code, watch this space!&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1080735106001</guid>
<pubDate>Wed, 31 Mar 2004 12:11:46 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1080735106001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1080735106001</wfw:comment>
</item>

<item>
<title>Notes to self</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1080357345001</link>
<description>&lt;p&gt;Upon return to England:&lt;br /&gt;1) Shower&lt;br /&gt;2) Sleep off jetlag&lt;br /&gt;3) Publish ASP HTTP class&lt;br /&gt;4) Publish ASP debugging class&lt;br /&gt;5) Republish ASP synamic download functions (originally posted &lt;a href=&quot;http://www.sitepoint.com/forums/showthread.php?t=67307&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;;-)&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1080357345001</guid>
<pubDate>Sat, 27 Mar 2004 03:15:45 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1080357345001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1080357345001</wfw:comment>
</item>

<item>
<title>A quick update</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1080311660001</link>
<description>&lt;p&gt;I've been enjoying a nice relaxing holiday here in Florida, with the highlights being a day at &lt;a href=&quot;http://themeparks.universalstudios.com/orlando/website/ioa_landing.html&quot; target=&quot;_blank&quot;&gt;Universal Islands Of Adventure&lt;/a&gt; and two day stay at the historic town of &lt;a href=&quot;http://www.oldcity.com/&quot; target=&quot;_blank&quot;&gt;St Augustine&lt;/a&gt;, where the what we now know as the United States of America was actually founded (*not* Jacksonville, as is often claimed).&lt;/p&gt;&lt;p&gt;The plan had been to visit Universal Studios today, but unfortunately car problems have put paid to that. Nevermind, I'm going to soak up some rays in the garden instead...&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1080311660001</guid>
<pubDate>Fri, 26 Mar 2004 14:34:20 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1080311660001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1080311660001</wfw:comment>
</item>

<item>
<title>I'm off!</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1079621447001</link>
<description>&lt;p&gt;Just thought I'd mention that I'm off to Tampa Bay, Florida for a 10 day holiday (well-deserved, I think, because although I've had some fun on my business trips, I haven't had a proper holiday for about 2 years), so I won't be around on the forums much (if at all), and I probably won't be posting anything here...&lt;/p&gt;&lt;p&gt;Pleased to see that &lt;a href=&quot;http://www.w3.weather.com/weather/local/USFL0481&quot; target=&quot;_blank&quot;&gt;the weather's looking pretty good&lt;/a&gt;... :D&lt;/p&gt;&lt;p&gt;Florida, here I come!&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1079621447001</guid>
<pubDate>Thu, 18 Mar 2004 14:50:47 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1079621447001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1079621447001</wfw:comment>
</item>

<item>
<title>Radical new forum architecture &amp; functionality?</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078931990001</link>
<description>&lt;p&gt;Last week I started &lt;a href=&quot;http://www.sitepoint.com/forums/showthread.php?p=1129780&quot; target=&quot;_blank&quot;&gt;a thread at Sitepoint Forums&lt;/a&gt; about some ideas I had for a new forum architecture, making extensive use of metadata to avoid some problems which are common to large forums (like which forum a thread &quot;belongs&quot; in), to allow users to create dynamic views of the forum tailored to their requirements, and to greatly enhance the sophistication of forum searches when trying to locate a solution to a problem (or find an old post).&lt;/p&gt;&lt;p&gt;There has been a little discussion, but not as much as I'd hoped, so perhaps you might have a few comments to throw into the melting pot!? Has it been done already?&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078931990001</guid>
<pubDate>Wed, 10 Mar 2004 15:19:50 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078931990001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078931990001</wfw:comment>
</item>

<item>
<title>Code snippet - dispose of an object / array</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078920890001</link>
<description>&lt;p&gt;It's always wise to manually dispose of objects and arrays that you use, since although ASP's garbage collection is much improved in ASP 3.0 (IIS 5), it is known to overlook some things, and hence lead to memory leaks.&lt;/p&gt;&lt;p&gt;Rather than typing the same old &quot;Set objSomething = Nothing&quot; every time, it's much easier to use a function/sub to do the job for you, and unsuprisingly I have one up my sleeve. It will automatically call .Close() on ADO objects, call .RemoveAll() on Dictionaries, and Erase arrays as appropriate - how many of you remember to do those every time?! Finally, it sets the variable to Empty, as if it was never used - not essential, but I like it!&lt;/p&gt;&lt;p&gt;&lt;pre&gt;Sub Kill(ByRef Obj)&lt;br /&gt;	Select Case True&lt;br /&gt;		Case IsObject(Obj)&lt;br /&gt;			Select Case LCase(TypeName(Obj))&lt;br /&gt;				Case &quot;recordset&quot;, &quot;command&quot;, &quot;stream&quot;, &quot;connection&quot;&lt;br /&gt;					'closeable ADO objects&lt;br /&gt;					If Obj.State &lt;&gt; 0 then&lt;br /&gt;						Obj.Close&lt;br /&gt;					End If&lt;br /&gt;				&lt;br /&gt;				case &quot;dictionary&quot;&lt;br /&gt;					'remove all the pairs&lt;br /&gt;					Obj.RemoveAll&lt;br /&gt;					&lt;br /&gt;				Case else&lt;br /&gt;					'something else so don't&lt;br /&gt;					'do anything special&lt;br /&gt;					&lt;br /&gt;			End Select&lt;br /&gt;			&lt;br /&gt;			Set Obj = Nothing&lt;br /&gt;		&lt;br /&gt;		Case IsArray(Obj)&lt;br /&gt;			'clear the array&lt;br /&gt;			Erase Obj&lt;br /&gt;		&lt;br /&gt;		Case Else&lt;br /&gt;			'do nothing at all&lt;br /&gt;			&lt;br /&gt;	End Select&lt;br /&gt;		&lt;br /&gt;	'Now revert it to an unitialized state&lt;br /&gt;	Obj = Empty&lt;br /&gt;End Sub&lt;/pre&gt;NOTE: It's also good to standardize your Sub calling syntax... I use the &lt;b&gt;Call SubName(Param1, Param2, ...)&lt;/b&gt; syntax so that whenever I pass parameters to something I use brackets.&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078920890001</guid>
<pubDate>Wed, 10 Mar 2004 12:14:50 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078920890001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078920890001</wfw:comment>
</item>

<item>
<title>Code snippet - output CSV from Recordset... a better way</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078920054001</link>
<description>&lt;p&gt;Amusingly, I've just found that I've coded a CSV generating function before, and I did a better job the first time round!! lol&lt;/p&gt;&lt;p&gt;Here's how I *should* have done it the other day...!&lt;pre&gt;Sub RecordsetToCSV(ByRef RS, ByVal CSVFilePath, ByVal IncludeFieldNames)&lt;br /&gt;	Set objCSVFile = CreateObject(&quot;ADODB.Stream&quot;)&lt;br /&gt;	Call objCSVFile.Open&lt;/p&gt;&lt;p&gt;	If IncludeFieldNames Then&lt;br /&gt;		'string concatenation issues aren't a problem for a small string of field names&lt;br /&gt;		For Each Field In RS.Fields&lt;br /&gt;			If FieldNames = &quot;&quot; Then&lt;br /&gt;				FieldNames = Field.Name&lt;br /&gt;			Else&lt;br /&gt;				FieldNames = FieldNames &amp; &quot;,&quot; &amp; Field.Name&lt;br /&gt;			End If&lt;br /&gt;		Next&lt;br /&gt;		&lt;br /&gt;		FieldNames = FieldNames &amp; vbCRLF&lt;br /&gt;		Call objCSVFile.WriteText(FieldNames, 1)&lt;br /&gt;	End If&lt;br /&gt;	&lt;br /&gt;	Call objCSVFile.WriteText(FieldNames &amp; RS.GetString(adClipString, , &quot;,&quot;, vbCRLF, &quot;&quot;))&lt;br /&gt;	Call objCSVFile.SaveToFile(CSVFilePath, 2)&lt;br /&gt;	Set objCSVFile = Nothing&lt;br /&gt;End Sub&lt;/pre&gt;Much better! :-)&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078920054001</guid>
<pubDate>Wed, 10 Mar 2004 12:00:54 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078920054001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078920054001</wfw:comment>
</item>

<item>
<title>More BlogWorks XML needed features</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078919356001</link>
<description>&lt;p&gt;Blog post categories with view filtering and corresponding separate RSS feeds (in addition to the existing one). I rather like &lt;a href=&quot;http://www.youngpup.net/index&quot; target=&quot;_blank&quot;&gt;YoungPup's approach&lt;/a&gt; but would probably use small (16x16 pixel) icons (with the category description on a tooltip via the TITLE attribute) instead of the *nix-style list.&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078919356001</guid>
<pubDate>Wed, 10 Mar 2004 11:49:16 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078919356001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078919356001</wfw:comment>
</item>

<item>
<title>Code snippet - create a disconnected Recordset</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078918966001</link>
<description>&lt;p&gt;Disconnected Recordsets are very handy for manipulating dynamically-populated tables of information (e.g. views of folders, with names, sizes, dates, times, etc) and so I have a handy little function for summoning one when needed:&lt;pre&gt;Function CreateDisconnectedRecordset()&lt;br /&gt;	Dim RS&lt;br /&gt;	Set RS = Server.CreateObject(&quot;ADODB.Recordset&quot;)&lt;br /&gt;	RS.CursorLocation = adUseClient&lt;br /&gt;	Set RS.ActiveConnection = Nothing&lt;br /&gt;	RS.CursorType = adOpenStatic&lt;br /&gt;	RS.LockType = adLockBatchOptimistic&lt;br /&gt;	Set CreateDisconnectedRecordset = RS&lt;br /&gt;End Function&lt;/pre&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078918966001</guid>
<pubDate>Wed, 10 Mar 2004 11:42:46 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078918966001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078918966001</wfw:comment>
</item>

<item>
<title>Code snippet - output CSV from Recordset</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078917205001</link>
<description>&lt;p&gt;Recently I desperately needed to examine some tables from an MSSQL database on a remote server (in Italy) that I couldn't access directly, and which didn't have Enterprise Manager (or any other useful tools) installed (so I couldn't get someone to extract them for me).&lt;/p&gt;&lt;p&gt;I came up with a VBScript Windows shell script to do the job, and thought that others might find my CSV file dumping function handy (you can use it as-is in an ASP script or shell script). Apologies for the lack of documentation (done in a hurry and I don't have time to comment it now), but I think it's fairly self explanatory anyway...&lt;pre&gt;Function RenderValue(ByVal Value)&lt;br /&gt;	If IsNull(Value) Then&lt;br /&gt;		RenderValue = &quot;&quot;&lt;br /&gt;	Else&lt;br /&gt;		RenderValue = Value&lt;br /&gt;	End If&lt;br /&gt;End Function&lt;/p&gt;&lt;p&gt;&lt;br /&gt;'Outputs a recordset to a CSV file&lt;br /&gt;Sub SaveRecordSetAsCSV(ByRef objRS, ByVal CSVFilePath)&lt;br /&gt;	Set objCSVFile = CreateObject(&quot;ADODB.Stream&quot;)&lt;br /&gt;	Call objCSVFile.Open&lt;/p&gt;&lt;p&gt;	If Not objRS.EOF Then&lt;br /&gt;		DataArray = objRS.GetRows&lt;br /&gt;	&lt;br /&gt;		XMax = objRS.Fields.Count - 1&lt;br /&gt;		YMax = UBound(DataArray, 2)&lt;br /&gt;	Else&lt;br /&gt;		XMax = objRS.Fields.Count - 1&lt;br /&gt;		YMax = 0&lt;br /&gt;	End If&lt;br /&gt;	&lt;br /&gt;	For X = 0 To XMax - 1&lt;br /&gt;		Call objCSVFile.WriteText(objRS.Fields(X).Name &amp; &quot;,&quot;)&lt;br /&gt;	Next&lt;br /&gt;	Call objCSVFile.WriteText(objRS.Fields(XMax).Name, 1)&lt;/p&gt;&lt;p&gt;	If IsArray(DataArray) Then&lt;br /&gt;		For Y = 0 To YMax&lt;br /&gt;			For X = 0 To XMax - 1&lt;br /&gt;				Call objCSVFile.WriteText(RenderValue(DataArray(X, Y)) &amp; &quot;,&quot;)&lt;br /&gt;			Next&lt;br /&gt;			&lt;br /&gt;			Call objCSVFile.WriteText(HandleNull(RenderValue(XMax, Y)), 1)&lt;br /&gt;		Next&lt;br /&gt;	End If&lt;br /&gt;	&lt;br /&gt;	Call objCSVFile.SaveToFile(CSVFilePath, 2)&lt;/p&gt;&lt;p&gt;	Set objCSVFile = Nothing&lt;br /&gt;End Sub&lt;/pre&gt;You'll probably want to add your own error handling code, and you probably should modify the RenderValue function to handle strings containing commas (I didn't need to at the time)!&lt;/p&gt;&lt;p&gt;UPDATE: See &lt;a href=&quot;http://marcustucker.com/blog/200403archive001.asp#1078920054001&quot;&gt;post above&lt;/a&gt; for a better way.&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078917205001</guid>
<pubDate>Wed, 10 Mar 2004 11:13:25 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078917205001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078917205001</wfw:comment>
</item>

<item>
<title>Blog bug</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078915467001</link>
<description>&lt;p&gt;There seems to be a problem (at least in IE 6, haven't had a chance to test in anything else) with the paragraph immediately following a &amp;lt;pre&amp;gt; element (which I've been using to post the code below)... I'll sort it out when I get a chance...&lt;/p&gt;&lt;p&gt;&lt;i&gt;EDIT 1: it looks like there's problems *inside* &amp;lt;pre&amp;gt; elements too... hmm...&lt;br /&gt;EDIT 2: In fact, I'm really not happy with the design of the site at all... it's virtually untouched from the default BlogWorks XML install, and for some unfathomable reason, all the pages currently have an embedded CSS stylesheet rather than linking to a shared external one.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;MentalNote&amp;gt;Really must give the site a redesign soon...&amp;lt;/MentalNote&amp;gt;&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078915467001</guid>
<pubDate>Wed, 10 Mar 2004 10:44:27 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078915467001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078915467001</wfw:comment>
</item>

<item>
<title>A few words on enumerated constants</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078914815001</link>
<description>&lt;p&gt;A particularly common error which comes up again and again (although happily on the decline) is people using enumerated constants (e.g. adOpenStatic) - something which is definitely to be encouraged (because of increased readability/maintainability, futureproofing if the value of the enumerated constant changes, etc.) - but failing to actually import the constants themselves into their scripts, which leads to all sorts of errors. This is entirely understandable, since this essential step is shamefully overlooked in the scripting documentation and most other relevant Microsoft reference material. When it *is* mentioned, usually only the antiquated method of including the ADOVBS.INC file is offered. However, there is a better way, which is to import the binary type library (a file containing information about the contents of a DLL, including enumerated constants) directly. &lt;/p&gt;&lt;p&gt;In your scripts (preferably in an include file that every script in your site will share, or in the GLOBAL.ASA) simply add the following lines *outside* of the script tags:&lt;pre&gt;&amp;lt;!-- METADATA TYPE=&quot;TypeLib&quot; NAME=&quot;Microsoft ActiveX Data Objects 2.5 Library&quot;&lt;br /&gt;UUID=&quot;{00000205-0000-0010-8000-00AA006D2EA4}&quot; --&amp;gt;&lt;br /&gt;&amp;lt;!-- METADATA TYPE=&quot;TypeLib&quot; NAME=&quot;Microsoft ADO Ext. 2.5 for DDL and Security&quot;&lt;br /&gt;UUID=&quot;{00000600-0000-0010-8000-00AA006D2EA4}&quot; --&amp;gt;&lt;/pre&gt;The above will import all the enumerated constants you need for using the ADO and ADOX objects (from ADO version 2.5), which include ADODB.Connection, ADODB.Recordset, ADODB.Stream, ADOX.Catalog, etc. The import of these values is much quicker (i.e. more efficient) than the traditional ADOVBS.INC method because the values are retrieved directly from the compiled binary typelib (rather than evaluating an ASP script) and also helps to avoid versioning problems. You will also find that only ADO has a readily available .INC file (which is out of date), so you would have to create your own for other libraries if you wanted to use that old approach.&lt;/p&gt;&lt;p&gt;These typelib imports work by looking up the UUID number in the section of the Windows registry where all the typelibs are stored (HKCR\TypeLib) to find where the typelib file is located on disk. For more on finding these yourself (which you may well need to do), read &lt;a href=&quot;http://www.atgconsulting.com/adotypelibs.asp&quot; target=&quot;_blank&quot;&gt;this excellent tutorial&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Incidentally, if you use the FSO, you may find it helpful to import is the Microsoft Scripting Runtime ({420B2830-E718-11CF-893D-00A0C9054228}), so that you don't have to do &lt;a href=&quot;http://www.4guysfromrolla.com/webtech/tips/t090600-2.shtml&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt;.&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078914815001</guid>
<pubDate>Wed, 10 Mar 2004 10:33:35 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078914815001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078914815001</wfw:comment>
</item>

<item>
<title>Code snippets - random integers and URL decoding</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078912576001</link>
<description>&lt;p&gt;It's about time I posted some code (I keep promising people on forums, but somehow I never get round to it) so here's a few bits &amp; bobs to start off with. I've got a huge code library to sift through, so I'll try to pick some things which will be helpful to a lot of people, as well as a few more interesting things here &amp; there...&lt;/p&gt;&lt;p&gt;Firstly, generating random integer numbers within a specified range seems to crop up from time to time, so here's what I wrote a number of years ago. Notice the way I use the &lt;b&gt;Select Case&lt;/b&gt; statement, which I think it far more elegant than the equivalent &lt;b&gt;If...ElseIf...Else&lt;/b&gt; statements would be...&lt;pre&gt;'Returns a random integer in the range specified (inclusive)&lt;br /&gt;Function RndInt(LowerBound, UpperBound)&lt;br /&gt;	Randomize()&lt;/p&gt;&lt;p&gt;	Select Case True&lt;br /&gt;		'rather pointless, but since it's possible...&lt;br /&gt;		Case UpperBound = LowerBound&lt;br /&gt;			RndInt = UpperBound&lt;br /&gt;		&lt;br /&gt;		'swap bounds if they're the wrong way round&lt;br /&gt;		Case UpperBound &lt; LowerBound&lt;br /&gt;			RndInt = Int((LowerBound - UpperBound + 1) * Rnd + UpperBound)&lt;br /&gt;		&lt;br /&gt;		'just generate it as normal&lt;br /&gt;		Case Else	&lt;br /&gt;			RndInt = Int((UpperBound - LowerBound + 1) * Rnd + LowerBound)&lt;br /&gt;	End Select&lt;br /&gt;End Function&lt;/pre&gt;Quite some time ago I noticed &lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vtorifunctions.asp&quot; target=&quot;_blank&quot;&gt;on MSDN&lt;/a&gt; that VBScript does actually have &lt;b&gt;Escape()&lt;/b&gt; and &lt;b&gt;UnEscape()&lt;/b&gt; functions, which rather oddly are not documented in the &lt;a href=&quot;http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&amp;displaylang=en&quot; target&quot;_blank&quot;&gt;downloadable Windows Scripting 5.6 reference help&lt;/a&gt; (if you don't have this downloaded, installed, and in regular use when coding then shame on you!!). I then used the &lt;b&gt;UnEscape()&lt;/b&gt; function to whip up a simple to decode URLs encoded with Server.URLEncode (Microsoft didn't see fit to provide one themselves):&lt;pre&gt;'Decodes a string encoded with Server.URLEncode()&lt;br /&gt;Function URLDecode(ByVal str)&lt;br /&gt;	str = UnEscape(str)&lt;br /&gt;	str = Replace(str,&quot;+&quot;,&quot; &quot;)&lt;br /&gt;	str = Replace(str,&quot;%2A&quot;,&quot;*&quot;)&lt;br /&gt;	str = Replace(str,&quot;%40&quot;,&quot;@&quot;)&lt;br /&gt;	str = Replace(str,&quot;%2D&quot;,&quot;-&quot;)&lt;br /&gt;	str = Replace(str,&quot;%5F&quot;,&quot;_&quot;)&lt;br /&gt;	str = Replace(str,&quot;%2B&quot;,&quot;+&quot;)&lt;br /&gt;	str = Replace(str,&quot;%2E&quot;,&quot;.&quot;)&lt;br /&gt;	str = Replace(str,&quot;%2F&quot;,&quot;/&quot;)&lt;br /&gt;	URLDecode = str&lt;br /&gt;End Function&lt;/pre&gt;More to follow later... must do some work!&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078912576001</guid>
<pubDate>Wed, 10 Mar 2004 09:56:16 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078912576001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078912576001</wfw:comment>
</item>

<item>
<title>Ok, so I lied!</title>
<link>http://marcustucker.com/blogold/200403archive001.asp#1078682717001</link>
<description>&lt;p&gt;Been back a week, no posts. I've been busy, ok?&lt;/p&gt;&lt;p&gt;I've just stumbled across &quot;&lt;a href=&quot;http://www.disclife.com/whatis.shtml&quot; target=&quot;_blank&quot;&gt;disc golf&lt;/a&gt;&quot;! Apparently it's big in the States, but I'm totally flabbergasted - I honestly have never heard of it!! It sounds good fun though, and I'll try to give it a shot when I visit Florida at the end of the month. There's even a course here in London, so if I like it I might take it up! :-)&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200403archive001.asp#1078682717001</guid>
<pubDate>Sun, 07 Mar 2004 18:05:17 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078682717001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078682717001</wfw:comment>
</item>

<item>
<title>Fundamental flaw...</title>
<link>http://marcustucker.com/blogold/200402archive001.asp#1078009503001</link>
<description>&lt;p&gt;I'm now back in the UK and will get busy on a few posts over the next couple of days, but for the moment I'm just going to comment on a fairly major (IMHO) bug that I've found in BlogWorks XML...&lt;/p&gt;&lt;p&gt;Compare &lt;a href=&quot;http://marcustucker.com/blog/&quot; target=&quot;_blank&quot;&gt;http://marcustucker.com/blog/&lt;/a&gt; and &lt;a href=&quot;http://www.marcustucker.com/blog/&quot; target=&quot;_blank&quot;&gt;http://www.marcustucker.com/blog/&lt;/a&gt;... what do you notice? Well, I'll give you a handy hint... all the comments disappear on the main pages (but are present on the comments pages accessed via the respective links)!&lt;/p&gt;&lt;p&gt;I haven't had a chance to look at the source, but it would seem that the code responsible for this is using absolute (rather than relative) URLs in the comments-related storage and lookup.. which doesn't make much sense to me, and is something I'll definitely have a look at pronto...&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200402archive001.asp#1078009503001</guid>
<pubDate>Sat, 28 Feb 2004 23:05:03 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1078009503001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1078009503001</wfw:comment>
</item>

<item>
<title>BlogWorks XML missing features</title>
<link>http://marcustucker.com/blogold/200402archive001.asp#1077196522001</link>
<description>&lt;p&gt;There are a few missing features in this software, of which the most serious is the total lack of an image upload facility, something I hadn't checked out before I left for my trip!&lt;/p&gt;&lt;p&gt;So far I have been going through the relatively laborious process of uploading to my homegrown CMS (that powers my main site), then grabbing the URLs (of the uploaded image and the thumbnail that my CMS automatically generates), building an HTML table manually with the necessary hyperlink and image code, and then finally being able to publish the post. This is plain silly, and I'll develop something to sort this out when I return!&lt;/p&gt;&lt;p&gt;Similarly, I think it would be handy (for me at least) to be able to see all the comments (and trackbacks) in one place, ordered reverse-chronologically, rather than having to click the &quot;comments&quot; link at the bottom of each post. Although I've seen all the comments that have been posted so far because I've noticed them, once I've got quite a few posts up, it will cease to be practical to check them all manually. There are also a few bugs in the post preview feature which I'll fix while I'm at it.&lt;/p&gt;&lt;p&gt;Do any of you use BlogWorks? If you have any requests for new features/fixes, I'd be happy to have a go at them too.&lt;/p&gt;&lt;p&gt;Naturally, I will get in touch with Rick (who's currently looking after BlogWorks XML) and offer my modifications for integration/public use (if he wants to do so).&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200402archive001.asp#1077196522001</guid>
<pubDate>Thu, 19 Feb 2004 13:15:22 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1077196522001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1077196522001</wfw:comment>
</item>

<item>
<title>Apologies</title>
<link>http://marcustucker.com/blogold/200402archive001.asp#1077039200001</link>
<description>&lt;p&gt;Two to make (not that anyone complained, but I feel a little guilty).&lt;/p&gt;&lt;p&gt;Firstly, for those expecting to tune in to a technical blog, I have committed the cardinal blogging sin of hijacking it for personal, non-technical stuff - I promise that once I return to England (in 10 days) I'll make up for it with some quality posts (perhaps even before then)... in the meantime, perhaps my input (and that of others) in these posts/threads might be of interest to some of you (for some reason, closing/deallocating/reusing objects seems to be a hot topic at the moment, and things aren't always as you might expect)...&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.codingforums.com/showthread.php?threadid=32980&quot; target=&quot;_blank&quot;&gt;Deallocating objects in VBScript&lt;/a&gt; (see &lt;a href=&quot;http://www.sitepoint.com/forums/showthread.php?t=152756&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; too)&lt;br /&gt;&lt;a href=&quot;http://www.sitepoint.com/forums/showthread.php?t=152218&quot; target=&quot;_blank&quot;&gt;Calling ByVal or ByRef?&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Secondly, for those of you who ARE actually interested in finding out how my travels are going, I'm sorry haven't been posting very regularly, however this is largely because it's been damn near impossible to get an internet connection in hotels. However, now I've finally sorted out an Italian ISP I should be fine for the rest of my stay, although since it's going on the company tab I can't use it as much as I would like to!! lol&lt;/p&gt;&lt;p&gt;Some more eye candy from Como last week:&lt;br /&gt;&lt;table border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000034.JPG&quot; target=&quot;_snap&quot;&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000034_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000035.JPG&quot; target=&quot;_snap&quot;&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000035_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000036.JPG&quot; target=&quot;_snap&quot; /&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000036_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;Since my last post I've had a great time in Venice thanks to Orsola (last photo, with me &amp; two of her friends), who has been kind enough to show me around (helping me avoid the hordes of tourists and bad restaurants along the way). We've got quite a lot planned for next weekend (when I return to Venice), including my attending a concert on Friday evening, where she is performing as part of a Venetian gospel choir. Other anticipated highlights should include the glassmaking island of Murano, the Basilica (best avoided until next weekend because of the 2hr queues), and perhaps another few churches.&lt;/p&gt;&lt;p&gt;Venice - damn cold, but very beautiful:&lt;br /&gt;&lt;table border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000037.JPG&quot; target=&quot;_snap&quot;&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000037_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000038.JPG&quot; target=&quot;_snap&quot;&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000038_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000039.JPG&quot; target=&quot;_snap&quot; /&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000039_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000040.JPG&quot; target=&quot;_snap&quot; /&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000040_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000041.JPG&quot; target=&quot;_snap&quot; /&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000041_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000043.JPG&quot; target=&quot;_snap&quot; /&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000043_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000042.JPG&quot; target=&quot;_snap&quot; /&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000042_t.JPG&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;I left Venice on Sunday evening, I've been staying in a beautiful hotel in Mira (just outside Venice) since then, and will be moving to a hotel in Padova tomorrow. Expect another update in a few days!&lt;/p&gt;&lt;p&gt;Incidentally, I'm about halfway through my business trip (that is after all why I'm here), and I must say that I'm delighted with the way the trip has gone from a that perspective! For those of you that don't know, I've been migrating from a web developer role to a business analyst, and this is my first real taste of how things will (hopefully) be.&lt;/p&gt;&lt;p&gt;It's been *very* satisfying to be the person doing the actual systems analysis from scratch for a change, rather than being the poor sod that's got to work with a half-planned half-specified system that someone else has come up with and deal with all the things have been overlooked and inevitably turn up at the 11th hour during development!!&lt;/p&gt;&lt;p&gt;Naturally I have no illusions that I've managed some sort of &quot;perfect&quot; analysis or achieved an ideal technical specification, and I'm realistic about there being changes between now and project completion, but I reckon I've got 99.9% of it nailed down based on the information I've been able to extract from each consultation session, and I've really enjoyed the challenge of working with new people and new systems to get the job done. It hasn't just been about the creature comforts of being on a business trip abroad!!&lt;/p&gt;&lt;p&gt;This bodes very well for the future, and I'm looking forward to carrying on with everything tomorrow (for the third of four consultations). Perhaps I've spoken too soon - I hope not, but I guess I'll just have to wait and see...&lt;/p&gt;&lt;p&gt;And finally, I've booked my 9-day holiday to Florida for the end of March, and I can't wait! Hurray!!&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200402archive001.asp#1077039200001</guid>
<pubDate>Tue, 17 Feb 2004 17:33:20 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1077039200001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1077039200001</wfw:comment>
</item>

<item>
<title>Venezia</title>
<link>http://marcustucker.com/blogold/200402archive001.asp#1076768801001</link>
<description>&lt;p&gt;I've dropped into an Internet caf&amp;#233; here in Venice, but alas it's not possible to post any more snaps at the moment (nor can I print out the Word document in my email which contains my hotel reservation information)... perhaps tomorrow.&lt;/p&gt;&lt;p&gt;The carnival is in full swing AND it's Valentine's day too, so Piazza San Marco is overrun with tourists! I must admit that I was slightly depressed at the thought of being in the most romantic city in the world on this particular day (travelling and eating alone is depressing enough as it is), but fortunately I met a lovely Venetian girl last night who has been showing me around a few less touristy places this morning, and she's promised to show me more this evening &amp; tomorrow... and next weekend when I return! So perhaps today might not turn out to be so bad after all - and I hope you enjoy your evening too!! ;)&lt;/p&gt;&lt;p&gt;Arrivederchi!&lt;/p&gt;&lt;p&gt;&lt;small&gt;EDIT: corrected typo in title&lt;/small&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200402archive001.asp#1076768801001</guid>
<pubDate>Sat, 14 Feb 2004 14:26:41 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1076768801001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1076768801001</wfw:comment>
</item>

<item>
<title>Ciao amici!</title>
<link>http://marcustucker.com/blogold/200402archive001.asp#1076518061001</link>
<description>&lt;p&gt;Some of you may know that I'm out in Italy on a business trip at the moment...&lt;/p&gt;&lt;p&gt;My journey out (yesterday) was rather nice, with magnificent views of the Alps from the plane as I neared Milan, and a magical night-time scene at Lake Como as I arrived at my hotel. I went for an evening walk, and enjoyed a wonderful 5-course meal at a local trattoria (a small family run restaurant), before a few DVDs in bed (on the laptop) before dozing off.&lt;/p&gt;&lt;p&gt;The lake was beautiful this morning, and the hills around it are quite something too. There's a funicular railway, and since I'm done for the day, I'm going to take a trip up to the top - hopefully I'll be able to catch the sunset from the summit...&lt;/p&gt;&lt;p&gt;Here's a few choice snaps:&lt;br /&gt;&lt;table border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000030.JPG&quot; target=&quot;_snap&quot;&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000030_t.JPG&quot; alt=&quot;Alps&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000031.JPG&quot; target=&quot;_snap&quot;&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000031_t.JPG&quot; alt=&quot;Lake by night&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000032.JPG&quot; target=&quot;_snap&quot;&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000032_t.JPG&quot; alt=&quot;Lake by night&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://marcustucker.com/data/images/000033.JPG&quot; target=&quot;_snap&quot;&gt;&lt;img src=&quot;http://marcustucker.com/data/images/000033_t.JPG&quot; alt=&quot;Mountain&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;More tomorrow! Arrivederchi!&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200402archive001.asp#1076518061001</guid>
<pubDate>Wed, 11 Feb 2004 16:47:41 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1076518061001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1076518061001</wfw:comment>
</item>

<item>
<title>Top ten web application vulnerabilities</title>
<link>http://marcustucker.com/blogold/200402archive001.asp#1076354712001</link>
<description>&lt;p&gt;&lt;a href=&quot;http://www.owasp.org/index&quot; title=&quot;the Open Web Application Security Project&quot; target=&quot;_blank&quot;&gt;OWASP&lt;/a&gt; last month published their &lt;a href=&quot;http://www.owasp.org/documentation/topten&quot; target=&quot;_blank&quot;&gt;list of the top ten vulnerabilities in web applications&lt;/a&gt;. Now how many of us can honestly put our hand on our heart and say &quot;&lt;i&gt;Yes! I have given serious consideration to each of these issues and how they might affect my new web application. No worries there.&lt;/i&gt;&quot; ??&lt;/p&gt;&lt;p&gt;Not me, that's for sure. Don't get me wrong. I would *like* to! There's nothing I hate more than having to cut corners on a project... but if you've barely been given enough time to implement the basic functionality that the project requires before it goes live, it's nigh on impossible to find the time to add anything beyond the most basic secruity features, let alone devote the time and effort throughout the entire project development process to cover the full spectrum.&lt;/p&gt;&lt;p&gt;Of course, by using a modular library of code that I've built up over the years, I have plenty of data validation (server-side and client-side), password hashing, and other security-related snippets of code that I can pull out of a hat and drop straight into an app, but that should only be a starting point, not the end of the security measures!&lt;/p&gt;&lt;p&gt;I think the biggest problem is perception - the powers that be seem to think that web applications are a quick 'n' easy alternative to developing a &quot;real&quot; application! They think it's all &lt;a href=&quot;#&quot; title=&quot;Rapid Application Development&quot;&gt;RAD&lt;/a&gt; (man)!!&lt;/p&gt;&lt;p&gt;Well I've got news... web applications ARE &quot;real&quot; applications - all the same rules apply! But there &lt;b&gt;is&lt;/b&gt; a very important difference... you're not just exposing the application to your intended user base... if it's published on the WWW then &lt;b&gt;anyone&lt;/b&gt; can have a go at exploiting it... and what's the business cost going to be if someone causes mayhem? A damn sight more than it would take to get it right in the first place, I'll bet!!&lt;/p&gt;&lt;p&gt;&lt;i&gt;Ok, rant over.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;I'd like to see more discussion on security throughout the web development cycle, so I've proposed that a new forum is created at &lt;a href=&quot;http://sitepoint.com/forums/&quot; target=&quot;_blank&quot;&gt;Sitepoint forums&lt;/a&gt; to this end. Security should not be an afterthought. It should be there right from the start.&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200402archive001.asp#1076354712001</guid>
<pubDate>Mon, 09 Feb 2004 19:25:12 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1076354712001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1076354712001</wfw:comment>
</item>

<item>
<title>Managing expectations</title>
<link>http://marcustucker.com/blogold/200402archive001.asp#1076338439001</link>
<description>&lt;p&gt;Any of you who know me from the forums will know that I religiously code everything myself from scratch, since 3rd party scripts are usually poorly written from a number of standpoints (good practice, efficiency, code neatness) and rarely live up to expectation.&lt;/p&gt;&lt;p&gt;However, I needed a blog in a hurry (I'm going on a 3-week business trip to Italy tomorrow) and so had to grab something to do the job off-the-peg. &lt;a href=&quot;http://hypothecate.co.uk/200401archive016.asp&quot; target=&quot;_blank&quot;&gt;BlogWorks XML&lt;/a&gt;, a GPL'd classic ASP blog script abandoned by its original author - and now kept alive (but unsupported) by &lt;a href=&quot;http://hypothecate.co.uk/about/&quot; target=&quot;_blank&quot;&gt;Rick Hurst&lt;/a&gt; - seemed to fit the bill the best, so I downloaded it and had it up and running within 5 minutes. In the brief time that I've spent playing with it, I've been pretty impressed with the user interface, perceived speed, and overall sophistication that it offers, although I'm yet to delve into the code itself to pass judgement on how it's put together! lol&lt;/p&gt;&lt;p&gt;Anyway, what spurned me to start this particular post was that I just noticed that there's no commenting facility, which is a bit of a shame. As soon as I return from my travels I'll add this feature, but until then, I invite you to submit your comments (if any) to me via &lt;a href=&quot;mailto:me@NOSPAMmarcustucker.com&quot;&gt;email&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;b&gt;EDIT: I take it all back! It turns out that BlogWorks XML &lt;u&gt;*does*&lt;/u&gt; support commenting! I've edited the text of the links at the bottom of each of these posts to make it more obvious... so comment away!&lt;/b&gt;&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200402archive001.asp#1076338439001</guid>
<pubDate>Mon, 09 Feb 2004 14:53:59 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1076338439001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1076338439001</wfw:comment>
</item>

<item>
<title>And so it began...</title>
<link>http://marcustucker.com/blogold/200402archive001.asp#1076337436001</link>
<description>&lt;p&gt;We've all got to start somewhere, so this is the first post of my new blog, which over time will hopefully come to be an interesting blend of my thoughts on web development (ASP / XHTML / JavaScript / MSSQL in particular), comments about various threads from the forums at &lt;a href=&quot;http://www.sitepoint.com/forums/&quot; target=&quot;_blank&quot;&gt;Sitepoint&lt;/a&gt; and &lt;a href=&quot;http://www.codingforums.com/&quot; target=&quot;_blank&quot;&gt;Codingforums&lt;/a&gt;, code snippets and other random bits &amp; bobs.&lt;/p&gt;&lt;p&gt;Your own thoughts and comments are welcomed, so don't be shy to get in touch!!&lt;/p&gt;</description>
<guid isPermaLink="true">http://marcustucker.com/blogold/200402archive001.asp#1076337436001</guid>
<pubDate>Mon, 09 Feb 2004 14:37:16 GMT</pubDate>
<trackback:ping>http://marcustucker.com/blogold/admin/incoming.asp?id=1076337436001</trackback:ping> 
<wfw:comment>http://marcustucker.com/blogold/admin/incoming.asp?id=1076337436001</wfw:comment>
</item>

</channel>
</rss>
