Click here to Skip to main content
15,915,826 members
Home / Discussions / C#
   

C#

 
AnswerRe: Help with sendkey or postmessage Pin
Luc Pattyn17-Feb-11 7:39
sitebuilderLuc Pattyn17-Feb-11 7:39 
QuestionConstructing a class from a static function Pin
musefan17-Feb-11 1:37
musefan17-Feb-11 1:37 
AnswerRe: Constructing a class from a static function Pin
Xmen Real 17-Feb-11 1:45
professional Xmen Real 17-Feb-11 1:45 
GeneralRe: Constructing a class from a static function Pin
musefan17-Feb-11 2:08
musefan17-Feb-11 2:08 
GeneralRe: Constructing a class from a static function Pin
PIEBALDconsult17-Feb-11 4:27
mvePIEBALDconsult17-Feb-11 4:27 
AnswerRe: Constructing a class from a static function Pin
Not Active17-Feb-11 2:25
mentorNot Active17-Feb-11 2:25 
GeneralRe: Constructing a class from a static function Pin
musefan17-Feb-11 2:43
musefan17-Feb-11 2:43 
Questiontext file > Binary and Binary > Text file Pin
grmihel217-Feb-11 0:39
grmihel217-Feb-11 0:39 
Hi guys...

I have need some help cuz I'm totally lost of how I should figure this out...
My case is:
- Make a storage function, so text documents like PDF, docx, doc, can be stored in the Database (MSSQL08 express).

Functions:
- Show files in a ListView (check)
- Upload files selected from the client, and store them as varbinary(max) in the Database (check)
- Download the selected file on the ListView to the correct documenttype on the clients PC (uncheck)


My database table is quiet simple and look something like:
ID - int (Primary key)NOT NULL (is identity)
FileName - varchar(50)NOT NULL
FileContent - varbinary(MAX)NOT NULL
FileExt - varchar(8) NOT NULL
FileComment - varchar(MAX) NULL

So as you can see, I can with ease locate if the selected file got .doc og .pdf extension.
The storage of a file into the varbinary of byte[] works brilliant!
But I'm stucked at how do I download those selected files back to the client, so they look excatly the same as when the document got uploaded to the db?
I mainly have two types of documents stored:
- WORD files
- PDF files


Can anyone provide at codesnippet or anything, that shows how to make a varbinary file (with bytes) into a appropreated document on the client computer readable as WORD document and/or PDF?
AnswerRe: text file > Binary and Binary > Text file Pin
Ravi Sant17-Feb-11 1:15
Ravi Sant17-Feb-11 1:15 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel217-Feb-11 1:26
grmihel217-Feb-11 1:26 
AnswerRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan17-Feb-11 1:15
mveRichard MacCutchan17-Feb-11 1:15 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel217-Feb-11 1:22
grmihel217-Feb-11 1:22 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan17-Feb-11 1:46
mveRichard MacCutchan17-Feb-11 1:46 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel217-Feb-11 4:07
grmihel217-Feb-11 4:07 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan17-Feb-11 4:24
mveRichard MacCutchan17-Feb-11 4:24 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel217-Feb-11 4:28
grmihel217-Feb-11 4:28 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan17-Feb-11 4:33
mveRichard MacCutchan17-Feb-11 4:33 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel218-Feb-11 0:14
grmihel218-Feb-11 0:14 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan18-Feb-11 1:36
mveRichard MacCutchan18-Feb-11 1:36 
GeneralRe: text file > Binary and Binary > Text file Pin
grmihel218-Feb-11 2:12
grmihel218-Feb-11 2:12 
GeneralRe: text file > Binary and Binary > Text file Pin
Richard MacCutchan18-Feb-11 2:45
mveRichard MacCutchan18-Feb-11 2:45 
QuestionDo I need to store my database in Application Data folder instead of Application.StartUp folder Pin
Nadia Monalisa16-Feb-11 22:35
Nadia Monalisa16-Feb-11 22:35 
AnswerRe: Do I need to store my database in Application Data folder instead of Application.StartUp folder Pin
Bernhard Hiller16-Feb-11 22:51
Bernhard Hiller16-Feb-11 22:51 
AnswerRe: Do I need to store my database in Application Data folder instead of Application.StartUp folder Pin
PIEBALDconsult17-Feb-11 1:47
mvePIEBALDconsult17-Feb-11 1:47 
QuestionEncryption and descryption using 3DES [modified] Pin
sarang_k16-Feb-11 21:58
sarang_k16-Feb-11 21:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.