<?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>Patrick Saunders</title>
	<atom:link href="http://www.patricksaunders.com.au/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.patricksaunders.com.au</link>
	<description>Programming &#38; ASP .Net web applications</description>
	<lastBuildDate>Sat, 11 Feb 2012 22:01:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Extending Code OnTime Web Site &#8211; Upload/Download any document type</title>
		<link>http://www.patricksaunders.com.au/2010/12/13/cot-download-all-document/</link>
		<comments>http://www.patricksaunders.com.au/2010/12/13/cot-download-all-document/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 05:13:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.patricksaunders.com.au/?p=174</guid>
		<description><![CDATA[By default, COT Web Site Factory only supports correct upload/download of images (though they said this will be fixed in future &#8211; ETA unknown). My changes make it possible to upload/download ALL file types. I do this by saving the name of the uploaded file into an additional column. This allows me to return the [...]]]></description>
			<content:encoded><![CDATA[<p>By default, COT Web Site Factory only supports correct upload/download of images (though they said this will be fixed in future &#8211; ETA unknown). My changes make it possible to upload/download ALL file types. I do this by saving the name of the uploaded file into an additional column. This allows me to return the name of the file back to browser; based on the file extension the browser will handle the binary octet stream.</p>
<p>To use:</p>
<ol>
<li>Replace the file App_code/handlers/Blob.ashx.cs  with the code below.</li>
<li>Whenever you add a new column, such as &#8220;BLOBCOL VARBINARY(MAX)&#8221; field to a table, you will need to add that handler entry to the top of Blob.ashx.cs</li>
<li>You must also add a corresponding column such as [BLOBCOL]FileName VARCHAR(100)&#8221;. This additional column is used to store the name of the uploaded file.</li>
</ol>
<p>As an aside, I use subversion. This is extremely handy in this case, because COT generator wipes out my changes on every regeneration. If you subversion, I just do a Revert on this file before building. If you&#8217;re not using Subversion it&#8217;s going to get painful, so, just use Subversion, it will save your butt one day, OK?<br />
 <img src='http://www.patricksaunders.com.au/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Note that I have uploaded it with .txt extension to make it easier to view/download. <em>Make sure you remove the handlers at the top and replace them with your own (look at the handler entries that COT generates in your blob.ashx.cx file, then copy, paste into my version.</em></p>
<p>Get the file here: <a href="http://www.patricksaunders.com.au/wp-content/uploads/2010/12/blob.ashx_.cs_.txt"> blob.ashx.cs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.patricksaunders.com.au/2010/12/13/cot-download-all-document/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle / SQL Server cheat sheet</title>
		<link>http://www.patricksaunders.com.au/2010/11/01/sql-cheat-sheet/</link>
		<comments>http://www.patricksaunders.com.au/2010/11/01/sql-cheat-sheet/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 00:35:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.patricksaunders.com.au/?p=135</guid>
		<description><![CDATA[If you have come to SQL Server from an Oracle, these tips on common tasks may be handy: To do this Oracle syntax SQL Server syntax Create table from SQL select create table NEWTABLE as select * from TABLE select * into NEWTABLE from SOURCETABLE]]></description>
			<content:encoded><![CDATA[<p>If you have come to SQL Server from an Oracle, these tips on common tasks may be handy:</p>
<table class="alignleft" style="border-color: #8d8a72; border-width: 0px; width: 552px; height: 82px;" border="0">
<tbody>
<tr style="background-color: #2e8b57;">
<td style="background-color: #2e8b57;"><span style="color: #ffffff;">To do this</span></td>
<td><span style="color: #ffffff;"> Oracle syntax</span></td>
<td><span style="color: #ffffff;">SQL Server syntax</span></td>
</tr>
<tr>
<td>Create table from SQL select</td>
<td>create table NEWTABLE as select * from TABLE</td>
<td>select * into NEWTABLE from SOURCETABLE</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.patricksaunders.com.au/2010/11/01/sql-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

