473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to store a doc file as it is in a field?

Hi !
im workin with the SQL server05, i want to store a document file as it is into a field in my database.
Some may suggest to extracting the text from the doc file to an array and passing it to the sp and save it ! I hope there should be a way around to store the document file as we save the images

My primary question is !
1. Can a .doc file be stored as it is in a data base field?
2. If so what data type should i use is it ntext or some other ?

Kindly provide me with a valid solution

Thanks in advance
Jan 12 '08 #1
1 1580
camel
55
You can store the document in SQL Server as a BLOB, the datatype is called Image in more recent versions of SQL Server. Look up SQL Server & BLOB in Google and you shall get a host of links explaining how to do this using ADO.

One caveat you should be aware of...whilst you can store any form of file in SQL Server as a BLOB that does not mean that you should. You need to think carefully about the likely size of files you will be saving and how the db will grow There comes a point where lots of BLOB storage can affect performance of the database very badly, it is best to read up and anticipate the likelihood of this in advance. Ultimately the file system is more efficient for file storage than SQL Server and you always have the option to store pointers (i.e., file paths) and metadata only in the database and leave the heavy lifing of the files to Windows
Jan 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: jacob nikom | last post by:
Hi, I would like to store XML files in MySQL. What is the best solution: 1. Convert it to string and store it as CLOB/text 2. Serialize it and store as byte array 3. Flatten it out and create...
3
by: Karen Grube | last post by:
Hi! Each week, we receive a two-page PDF file from UPS along with a separate flat file (a CSV) The PDF file contains the overview of our weekly invoice and the CSV contains the details of each...
11
by: hoopsho | last post by:
Hi Everyone, I am trying to write a program that does a few things very fast and with efficient use of memory... a) I need to parse a space-delimited file that is really large, upwards fo a...
2
by: Nicolas | last post by:
How to store multiple files in only one sql blod field in sql database Like I got a record for a house: ID Name addresss price attachments The field "attachments" may contains documents...
3
by: Solution Seeker | last post by:
I want to Store the String value with Single Quotes in the Field of Database where if i try to Store the String value with Single Quotes (as it is) then it is throwing the error as SQL String...
3
by: deko | last post by:
I have a subform datasheet which holds hyperlinks to documents stored on local disk. Each database record has a series of documents associated it. The link is stored in the table like this: ...
2
by: wschanks | last post by:
I have an .adp (Access 2003) file and I need to store files in a field on the database. I have figured out that I need the data type to be 'Image', so I have my table with the this datatype. ...
5
by: lawrence k | last post by:
I'm a little weak on my basic I/O. Help me out please. Is it right to say that I can just open any file with file(), get it as a string, and then store in a MySql database, in, say, a MediumText...
4
by: lyealain | last post by:
how to store many files in one database fields?? i manage to store one file into database field.. but fail to store many files..... how should i do that>> one database field for many files name.....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.