Upload word doc to SQL Server

Posted by Parsen under Sql Server on 9/25/2012 | Points: 10 | Views : 892 | Status : [Member] | Replies : 4
Hi
I need some help on code to "Upload a word doc to SQL Server as a byte" and next criteria is to "retrieve the same as doc"
Thanks




Responses

Posted by: Vikash on: 9/26/2012 [Member] Starter | Points: 25

Up
0
Down
Here u will find ur complete solution, not for a word doc file but for any file(like image).

http://www.c-sharpcorner.com/uploadfile/krishnasarala/inserting-file-and-retrieving-it-from-sql-server-in-Asp-Net/

if helpful, mark as answer.

Regards,
Vikash Pathak

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

Posted by: Hariinakoti on: 9/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Parsen,
see this links.I think it is useful to u
http://www.codeproject.com/Articles/225446/Uploading-and-downloading-files-to-from-a-SQL-Serv
http://www.codeproject.com/Articles/308552/Upload-and-Download-Files-to-SQL-Servers-in-ASP-Ne

Thanks & Regards
Hari

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

Posted by: Hariinakoti on: 9/26/2012 [Member] Starter | Points: 25

Up
0
Down
Please Mark As Answer if u satisfy with my answer.

Thanks & Regards
Hari

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

Posted by: Pandians on: 9/26/2012 [Member] [MVP] Silver | Points: 25

Up
0
Down
You can use VARBINARY datatype and OPENROWSET with BULK option in SQL Server!

Check it out!
Create Table DocObjects

(
Slno Int Identity(1,1),
Doc VarBinary(MAX)
)
Go

Insert DocObjects(Doc)
SELECT * from OPENROWSET(BULK N'D:\Sampledoc.docx', SINGLE_BLOB) as Doc
Go


Cheers
www.SQLServerbuddy.blogspot.com
iLink Multitech Solutions

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

Login to post response