Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
cstokes91
Yak Posting Veteran
72 Posts |
Posted - 2013-08-20 : 16:15:44
|
Okay... before you see this and immediately say that varbinary is better... I know and wish that was an option. I am trying to insert a clients word documents into a database to be able to be viewed from our application (not an option to modify the application for this situation either)... the only field that would work (if it is even possible) is a varchar(max). Is there ANY way to convert and get the text from a Microsoft Word document to varchar(max)? |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2013-08-20 : 20:11:27
|
Probably not, since Word contains binary information along with the text. If you did import it to varchar(max), it will either get dropped or garble the data.I would almost say that filestream might work here, but I'm pretty sure that only works for varbinary(max) as well.If you're a masochist, you can write some VBA macros in Word that opens the document, extracts just the text info, and then imports that into a database. Frankly you're far better off changing the column to varbinary(max). |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
LoztInSpace
Aged Yak Warrior
940 Posts |
Posted - 2013-08-21 : 09:01:31
|
Word docs are just ZIP compressed XML. You may be able to use that to your advantage. It's either that or convert to Base64 :(Given that it's "our application" it's silly you can't do this properly (blob/varbinary) because ultimately it's only you that has to deal with it. |
|
|
|
|
|