<?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>creacog &#187; asp</title>
	<atom:link href="http://blog.creacog.co.uk/category/microsoft/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.creacog.co.uk</link>
	<description></description>
	<lastBuildDate>Thu, 19 Jan 2012 16:43:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Persits AspUpload, Content-type and Safari</title>
		<link>http://blog.creacog.co.uk/2010/05/01/persits-aspupload-content-type-and-safari/</link>
		<comments>http://blog.creacog.co.uk/2010/05/01/persits-aspupload-content-type-and-safari/#comments</comments>
		<pubDate>Sat, 01 May 2010 12:48:45 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Safari browser]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/?p=477</guid>
		<description><![CDATA[A quick note for anyone using legacy server-side classic ASP and the Persits AspUpload component&#8216;s sendBinary to download files to Apple&#8217;s Safari browser. I ran into a problem recently where by Safari was appending &#8220;.html&#8221; to the file name of all downloads sent via the component. e.g. test.pdf would download as test.pdf.html. There are a [...]]]></description>
			<content:encoded><![CDATA[<p>A quick note for anyone using legacy server-side classic ASP and the <a title="AspUpload" href="http://www.aspupload.com/index.html" target="_blank">Persits AspUpload component</a>&#8216;s sendBinary to download files to Apple&#8217;s Safari browser.</p>
<p>I ran into a problem recently where by Safari was appending &#8220;.html&#8221; to the file name of all downloads sent via the component. e.g. test.pdf would download as test.pdf.html. There are a couple of mentions on the apple support forums:</p>
<ul>
<li><a title="Safari: Downloaded file's filename may have an additional extension" href="http://support.apple.com/kb/TA24293" target="_blank">Safari: Downloaded file&#8217;s filename may have an additional extension</a></li>
<li><a title="Topic : Safari adds .html extension to common downloads" href="http://discussions.apple.com/message.jspa?messageID=8822297" target="_blank">Topic : Safari adds .html extension to common downloads</a></li>
</ul>
<p>PDF files downloaded directly did not suffer this problem &#8211; suggesting that the server&#8217;s mime types seem ok. Other browsers did not suffer this problem. However the problem has to be server-side. i.e. the download via the script is being sent with Content-type text/html instead of application/pdf no matter what arguments I add to the <a title="Chapter 9. Miscellaneous Features 9.1 AspUpload's Non-Upload Functionality 9.2 Secure File Downloading 9.3 Directory Listing 9.4 Interactive File Deletion 9.5 ActiveX Registration 9.6 Encryption Support 9.7 Introducing XUpload and JUpload 9.1 AspUpload's Non-Upload Functionality  AspUpload's functionality is not limited to file uploading. It is a complete file management solution. Other AspUpload features include secure file downloading, directory listing, and ActiveX registration. 9.2 Secure File Downloading" href="http://www.aspupload.com/manual_misc.html#9_2" target="_blank">sendBinary</a> call.</p>
<p>The solution seems to be to manually set the script&#8217;s Response.contentType value. i.e. the following test script works&#8230;</p>
<pre>&lt;%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%&gt;
&lt;%
    FILEPATH = "D:\WWWRoot\sitepath\www\pdftest\TEST.pdf"
    Dim upl
    Set upl = Server.CreateObject("Persits.Upload.1")

    Response.ContentType = "application/pdf"

    upl.sendbinary FILEPATH, True, "application/pdf", True
%&gt;</pre>
<p>In my case this is using AspUpload version 3.0.0.2 on a Hostway Windows 2003 Gold plan, shared hosting.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2010/05/01/persits-aspupload-content-type-and-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ms access more syntax error issues that aren&#8217;t</title>
		<link>http://blog.creacog.co.uk/2007/07/20/ms-access-more-syntax-error-issues-that-arent/</link>
		<comments>http://blog.creacog.co.uk/2007/07/20/ms-access-more-syntax-error-issues-that-arent/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 13:50:05 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[asp]]></category>
		<category><![CDATA[MS Access]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/2007/07/20/ms-access-more-syntax-error-issues-that-arent/</guid>
		<description><![CDATA[Continuing from yesterday&#8217;s strangeness&#8230; Yesterday, my hosting provider found that the mdb file&#8217;s &#8220;write and modify permissions were missing&#8221;. Very odd! but since that was fixed my ASP scripts could now INSERT. Today I have almost a repeat of the same symptoms, except this time I can still INSERT but cannot UPDATE. The error given [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing from yesterday&#8217;s strangeness&#8230;</p>
<p>Yesterday, my hosting provider found that the mdb file&#8217;s &#8220;write and modify permissions were missing&#8221;. Very odd! but since that was fixed my ASP scripts could now INSERT.</p>
<p>Today I have almost a repeat of the same symptoms, except this time I can still INSERT but cannot UPDATE. The error given is the same as yesterday i.e. a syntax error in the sql. The sql works fine when executed within the access application. The error number was the same as yesterday&#8230;</p>
<blockquote><p> -2147217900, Syntax error in UPDATE statement</p></blockquote>
<p>I followed the advice <a href="http://forums.databasejournal.com/archive/index.php/t-30699.html" title="Database Journal Foums">on this forum entry</a> to switch the connection string from an OLE DB connection string to a basic Microsoft Access Driver string. i.e.</p>
<blockquote><p>&#8220;Driver={Microsoft Access Driver (*.mdb)};<br />
DBQ=D:\wwwroot\domain.com\database\database.mdb&#8221;</p></blockquote>
<p>And this fixed it! I have a load of old sites out there still working happily with OLE DB connection strings to access databases. I&#8217;m not sure why this one has been so difficult.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2007/07/20/ms-access-more-syntax-error-issues-that-arent/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>when is a syntax error not a syntax error</title>
		<link>http://blog.creacog.co.uk/2007/07/19/when-is-a-syntax-error-not-a-syntax-error/</link>
		<comments>http://blog.creacog.co.uk/2007/07/19/when-is-a-syntax-error-not-a-syntax-error/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 16:41:38 +0000</pubDate>
		<dc:creator>creacog</dc:creator>
				<category><![CDATA[asp]]></category>
		<category><![CDATA[MS Access]]></category>

		<guid isPermaLink="false">http://blog.creacog.co.uk/2007/07/19/when-is-a-syntax-error-not-a-syntax-error/</guid>
		<description><![CDATA[Answer: When you are doing an INSERT INTO on an Access database which is read-only. I&#8217;ve just been doing a bit of classic ASP with MS Access back-end database. I traditionally use the RecordSet object and AddNew to insert records. But thought I&#8217;d be good on this occasion and use Jet SQL and the Command [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Answer: </strong>When you are doing an INSERT INTO on an Access database which is read-only.</p>
<p>I&#8217;ve just been doing a bit of classic ASP with MS Access back-end database. I traditionally use the RecordSet object and AddNew to insert records. But thought I&#8217;d be good on this occasion and use Jet SQL and the Command Object. Unfortuantely the script broke with error:</p>
<blockquote><p> Microsoft JET Database Engine error &#8217;80040e14&#8242;<br />
Syntax error in INSERT INTO statement.</p></blockquote>
<p>80040e14 is a fairly generic error code, with lots of possible causes. Just give it a google!</p>
<p>I checked and double-checked my SQL syntax, which looked fine. Even entering it directly into the Access application showed no problem. I then wrapped the code with the On Error Next, and an error trap which reported the following variation:</p>
<blockquote><p>Error: -2147217900 Syntax error in INSERT INTO statement.</p></blockquote>
<p>Same description, but googling the error number revealed just a few results, <a href="http://www.programmingtalk.com/showthread.php?t=2241" title="Programming talk">this amongst them suggesting a permissions problem</a>. Which I didn&#8217;t quite believe at first, why would the hosting provider cause the mdb file to be read-only? It is in a folder outside the webroot, if I ask them for a SQLServer account, I&#8217;m sure it will allow me to insert records!</p>
<p>Replacing my code with my more traditional RecordSet object, AddNew and Update commands revealed and confirmed the error&#8230;</p>
<blockquote><p>Microsoft JET Database Engine error &#8217;80040e09&#8242;<br />
Cannot update. Database or object is read-only.</p></blockquote>
<p>If I&#8217;d stuck with my old way of doing things I&#8217;d have saved a whole load of time spent looking in the wrong places.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.creacog.co.uk/2007/07/19/when-is-a-syntax-error-not-a-syntax-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

