Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 11th, 2006, 02:00 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to convert Word files into Binary Stream

hi all,
i have some word files and i need them to be stored in SQL database in binary format.
also i may need to open same word file from the database itself.

how to do that?

i have the code to convert jpeg (image) files into binary stream, but no idea how to convert and retrieve word files

Reply With Quote
  #2 (permalink)  
Old January 8th, 2007, 02:34 PM
Registered User
 
Join Date: Nov 2003
Location: Canton, OH, USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Hadware Send a message via Yahoo to Hadware
Default

Try using:
                ' Determine File Type
                strFileExtension = Right(txtFileContents.PostedFile.FileName, 4)
                Select Case strFileExtension.ToLower
                    Case ".doc"
                        strFileType = "doc"
                    Case ".ppt"
                        strFileType = "ppt"
                    Case ".htm"
                        strFileType = "htm"
                    Case "html"
                        strFileType = "htm"
                    Case ".xls"
                        strFileType = "xls"
                    Case Else
                        strFileType = "txt"
                End Select

If you can upload images into a database through binary this should help. If you need any more help with uploading and downloading word docs let me know.

hope that helps.

--Eric
Reply With Quote
  #3 (permalink)  
Old March 27th, 2007, 07:00 AM
Registered User
 
Join Date: Mar 2007
Location: Chennai, Tamil Nadu, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ajishkm
Default

hi kesar..

 i want to convert jpeg file into binary stream and back.. will u please help me to do that.. its very urgent..

 thanks in advance..

Ajish

Reply With Quote
  #4 (permalink)  
Old March 27th, 2007, 07:06 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

What type of application?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #5 (permalink)  
Old March 28th, 2007, 04:43 AM
Registered User
 
Join Date: Mar 2007
Location: Chennai, Tamil Nadu, India.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ajishkm
Default

hi..

  i am working on a network monitoring tool in C#. in that there is an option to take the print screen of the client machine and send that jpeg image(screen image) back to the server.

  i am doing this through socket programming. So i need to convert the jpeg file into binary stream to send it through the socket and then need to convert it back into original format for displaying at the server side.
   hope this will help you to understand the kind of application and the solution for it..

thanks,

Ajish

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert Html Stream into PDF format anwar_suk Classic ASP Basics 1 May 25th, 2006 07:57 AM
xml binary file to ADO stream clk1022 XML 1 March 17th, 2006 03:33 PM
XML binary file to ADO stream object clk1022 ASP.NET 2.0 Professional 0 March 16th, 2006 10:31 PM
XML binary file to ADO Stream object clk1022 VB.NET 1 March 16th, 2006 10:23 PM
plus '+' replace by space " " in binary stream rupakb XML 0 October 26th, 2004 11:35 AM



All times are GMT -4. The time now is 06:33 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.