[asp-developers] Actual question: upload a file and store it in a db (MSSQL)

  • From: "Jacob Kruger" <jacobk@xxxxxxxxxxx>
  • To: <asp-developers@xxxxxxxxxxxxx>
  • Date: Fri, 29 Jun 2007 02:47:52 +0200

Hi all

Something specific I'm trying to do now is use a web form with, specifically, a <input type="file"... element to be able to upload an image file to the server where I want to store it in an SQL database.

I've so far only found some code samples relative to taking the actual file and 'saving' it into a writeable folder on the server, and while this code can in fact return the 'value', 'content type' etc. of the item, when I then try to use the ADODB.Command object to create the necessary parameter to be passed through to a stored procedure on the SQL server, I either get errors related to some or other string value being right-truncated, or the server moans at me that the parameter object has in fact not been created properly.

I'm pretty sure I managed something like this in the past, but that was a while ago, and I can't find any code samples etc., and like I said, I've been searching using Google, and so far, the code I mentioned above is the closest I've come.

Any ideas...?


Jacob Kruger
Blind Biker

Other related posts:

  • » [asp-developers] Actual question: upload a file and store it in a db (MSSQL)