how to upload a file in sql server database and download a file through database

Posted by Amar888 under Regular Expressions on 2/18/2010 | Views : 3219 | Status : [Member] | Replies : 4
hi
i want to upload a file in sqlserver using asp ,c# 3.5 it stores binary format if i want to see that i need to download data right how? can u send me code for that


Thanking you,


ur's,
Amar




Responses

Posted by: Vuyiswamb on: 2/18/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day

This Question has been Answered here
http://www.dotnetfunda.com/forums/thread1436-howto-upload-file.aspx

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Amar888, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bubbly on: 2/18/2010 [Member] Bronze

Up
0
Down

Posted by: Nishithraj on: 2/18/2010 [Member] Bronze

Up
0
Down
You can do as like in the following link

http://www.beansoftware.com/ASP.NET-Tutorials/Binary-Files-To-Database.aspx

Mark this as answer, if it is.....

With regards
Nishithraj Narayanan

Amar888, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Abhi2434 on: 2/18/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
If you know how to store data in SQL server, you just need to add a column to the table with Image datatype, and another a nvarchar with ContentType.

Now while you upload, convert the file to Byte Array and store it in sql server. also put the Content Type of the file into the nVarchar field.

Simple like that.

www.abhisheksur.com

Amar888, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response