<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: How to store files in a MS-SQL Server database using ASP.NET</title>
	<atom:link href="http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/</link>
	<description>Writing about programming</description>
	<pubDate>Fri, 30 Jul 2010 16:33:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Mark Bedell</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-4530</link>
		<dc:creator>Mark Bedell</dc:creator>
		<pubDate>Tue, 06 Jul 2010 21:11:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-4530</guid>
		<description>Got it figured out and it seems to work perfectly. Figured I'd let you know so you didn't knock yourself out trying to figure it out.

Thanks</description>
		<content:encoded><![CDATA[<p>Got it figured out and it seems to work perfectly. Figured I&#8217;d let you know so you didn&#8217;t knock yourself out trying to figure it out.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Bedell</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-4528</link>
		<dc:creator>Mark Bedell</dc:creator>
		<pubDate>Tue, 06 Jul 2010 16:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-4528</guid>
		<description>I thought of that but I can't figure out how to send it to a file either. I also concidered assigning the result to a variable and then attache the variable. Same problem. Short of bringing up a window that allows open or save I can't seem to ifentify it as an object that I can do anything with. What I would like to do is be able to say something along these lines: 

MailAttachment attach = new MailAttachment("FileStream.ashx?ID=xxx");

Where the ID is the unique identifier in the SQL db. It works just fine if I'm using a link but MailAttachement isn't looking for an HREF it's looking for a location.

I'll keep looking. Thanks.

PS There could be more than one file that will need to be attached.</description>
		<content:encoded><![CDATA[<p>I thought of that but I can&#8217;t figure out how to send it to a file either. I also concidered assigning the result to a variable and then attache the variable. Same problem. Short of bringing up a window that allows open or save I can&#8217;t seem to ifentify it as an object that I can do anything with. What I would like to do is be able to say something along these lines: </p>
<p>MailAttachment attach = new MailAttachment(&#8221;FileStream.ashx?ID=xxx&#8221;);</p>
<p>Where the ID is the unique identifier in the SQL db. It works just fine if I&#8217;m using a link but MailAttachement isn&#8217;t looking for an HREF it&#8217;s looking for a location.</p>
<p>I&#8217;ll keep looking. Thanks.</p>
<p>PS There could be more than one file that will need to be attached.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars-Erik Kindblad</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-4515</link>
		<dc:creator>Lars-Erik Kindblad</dc:creator>
		<pubDate>Fri, 02 Jul 2010 11:32:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-4515</guid>
		<description>You should be able to use more or less the same code, but instead of flushing it out on the web, you store it temporarily on the disk instead. Then you use the path to the file when attaching the files to the e-mail.</description>
		<content:encoded><![CDATA[<p>You should be able to use more or less the same code, but instead of flushing it out on the web, you store it temporarily on the disk instead. Then you use the path to the file when attaching the files to the e-mail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Bedell</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-4513</link>
		<dc:creator>Mark Bedell</dc:creator>
		<pubDate>Thu, 01 Jul 2010 22:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-4513</guid>
		<description>I am using the FileStream.ashx file exactly as written and it works perfectly when I'm getting a file from SQL and showing it to the user. The problem is I now need to pull a file from SQL and make it an attachment in an email. I have the code that will create an email and add as many attachments as I need but it only want's to work with real files on a server. I tried to just call FileStream.ashx but that just blew up. is there a way to full the file out of SQL and either save it on the server (may not be possilbe due to security) or just attach it directly to the Email (prefered).

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>I am using the FileStream.ashx file exactly as written and it works perfectly when I&#8217;m getting a file from SQL and showing it to the user. The problem is I now need to pull a file from SQL and make it an attachment in an email. I have the code that will create an email and add as many attachments as I need but it only want&#8217;s to work with real files on a server. I tried to just call FileStream.ashx but that just blew up. is there a way to full the file out of SQL and either save it on the server (may not be possilbe due to security) or just attach it directly to the Email (prefered).</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars-Erik Kindblad</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-4181</link>
		<dc:creator>Lars-Erik Kindblad</dc:creator>
		<pubDate>Tue, 23 Mar 2010 07:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-4181</guid>
		<description>Nick: If you want to do this, you need to have an aspx page with an image tag  pointing to FileStream.ashx. In this aspx you can also add comments, rating etc.</description>
		<content:encoded><![CDATA[<p>Nick: If you want to do this, you need to have an aspx page with an image tag  pointing to FileStream.ashx. In this aspx you can also add comments, rating etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-4133</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Mon, 15 Mar 2010 23:48:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-4133</guid>
		<description>Hello, Thanks for the help.
I had another question when the picture opens it only shows that picture and nothing else how can I add something that it just maximizes the picture so I can add a comment field, rating...etc?</description>
		<content:encoded><![CDATA[<p>Hello, Thanks for the help.<br />
I had another question when the picture opens it only shows that picture and nothing else how can I add something that it just maximizes the picture so I can add a comment field, rating&#8230;etc?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars-Erik Kindblad</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-4011</link>
		<dc:creator>Lars-Erik Kindblad</dc:creator>
		<pubDate>Sun, 28 Feb 2010 09:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-4011</guid>
		<description>Nick: The code reads the name of the database from a connectionString element named "ConnectionString" located below the connectionStrings section in the .config file.</description>
		<content:encoded><![CDATA[<p>Nick: The code reads the name of the database from a connectionString element named &#8220;ConnectionString&#8221; located below the connectionStrings section in the .config file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-3951</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Wed, 24 Feb 2010 03:15:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-3951</guid>
		<description>What do you name the database?</description>
		<content:encoded><![CDATA[<p>What do you name the database?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-3629</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Tue, 26 Jan 2010 15:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-3629</guid>
		<description>Why is it, on every code sample someone puts up, does someone come in and say "Oh, can you post a [VB&#124;C#] version of this?"  (If you can't decipher this sentence, please find another job that doesn't involve programming).

C'mon people, are you developers or copy-paste programmers?  It's a simple .NET example.  You need to be able to read C# and type VB or vice-versa.  There's even converters out on the net to do the job for you.

The code differences between the C# &#38; VB blocks above are 90% the same, most of it is syntax and type conversion differences.  This is simple stuff!  Can you not figure this out?

From now on, if I put out a piece of code on the net, I'll be putting it in whatever language I am most comfortable with, and a disclaimer.  "If you can't figure out how to convert this to your language, then you cannot use this code".

Have a nice day!</description>
		<content:encoded><![CDATA[<p>Why is it, on every code sample someone puts up, does someone come in and say &#8220;Oh, can you post a [VB|C#] version of this?&#8221;  (If you can&#8217;t decipher this sentence, please find another job that doesn&#8217;t involve programming).</p>
<p>C&#8217;mon people, are you developers or copy-paste programmers?  It&#8217;s a simple .NET example.  You need to be able to read C# and type VB or vice-versa.  There&#8217;s even converters out on the net to do the job for you.</p>
<p>The code differences between the C# &amp; VB blocks above are 90% the same, most of it is syntax and type conversion differences.  This is simple stuff!  Can you not figure this out?</p>
<p>From now on, if I put out a piece of code on the net, I&#8217;ll be putting it in whatever language I am most comfortable with, and a disclaimer.  &#8220;If you can&#8217;t figure out how to convert this to your language, then you cannot use this code&#8221;.</p>
<p>Have a nice day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vinayak</title>
		<link>http://www.kindblad.com/2008/04/12/how-to-store-files-in-a-ms-sql-server-database-using-aspnet/#comment-3579</link>
		<dc:creator>vinayak</dc:creator>
		<pubDate>Wed, 20 Jan 2010 08:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.kindblad.com/2008/04/12/storing-files-in-a-ms-sql-server-database-using-aspnet/#comment-3579</guid>
		<description>very use full code but if there r n number of file that have been uploaded and if we want to down load the only one file from database den what would be the c# code...

Thank u very much....</description>
		<content:encoded><![CDATA[<p>very use full code but if there r n number of file that have been uploaded and if we want to down load the only one file from database den what would be the c# code&#8230;</p>
<p>Thank u very much&#8230;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
