Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save binary data in database

Status
Not open for further replies.

netangel

Programmer
Feb 7, 2002
124
PT
I need to upload a file and save it in a SQL Server database.
I know how to upload it, saving it to the server hard disk.
I also know how to read it from the database.

My problem is saving it to the database. And can I save it directly without saving it to the server hard disk? The HttpPostedFile has a property InputStream. Can I somehow use it to send the file directly to the database? NetAngel
 
At a recent usergroup meeting, a guy from MS showed how to do this. Here is a link to his notes:


It'll be the first one at the top: "Tips & Tricks". Most everything in his notes is pretty elementary, but there are some good things in there, too. Don't forget to check out the rest of the notes there, as well... lots o' good stuff.

hth :)
paul
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top