473,326 Members | 2,113 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,326 software developers and data experts.

Storing/Retrieving Files In Database

Hi. I'm using SQL Server 2005. I'd like to know if anyone has any
reference on how to allow users to upload a file **onto a database**.
In other words, a user can have several related files belonging to
him. Also, I would need a syntax that allowed me to retrieve those
files.

I'm sure this is possible. Aside from that information, can anyone
suggest whether this is the proper method? I know I can simply store
the paths, but starting to juggle various directories is not really my
cup of tea; if there is only one directory to store all the files,
some of them might have the same name, thus creating a conflict. That
is something I do not need to worry about if everything is stored in a
table image field.

In any case, thank you in advance for your help.

Cindy
Mar 8 '08 #1
4 2019
On Mar 8, 5:31*am, Cindy <cindyc...@hotmail.comwrote:
Hi. *I'm using SQL Server 2005. *I'd like to know if anyone has any
reference on how to allow users to upload a file **onto a database**.
In other words, a user can have several related files belonging to
him. *Also, I would need a syntax that allowed me to retrieve those
files.

I'm sure this is possible. *Aside from that information, can anyone
suggest whether this is the proper method? *I know I can simply store
the paths, but starting to juggle various directories is not really my
cup of tea; if there is only one directory to store all the files,
some of them might have the same name, thus creating a conflict. *That
is something I do not need to worry about if everything is stored in a
table image field.

In any case, thank you in advance for your help.

Cindy
http://www.google.com/search?hl=en&q...+into+database
Mar 8 '08 #2
On Mar 8, 9:20*am, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Mar 8, 5:31*am, Cindy <cindyc...@hotmail.comwrote:


Hi. *I'm using SQL Server 2005. *I'd like to know if anyone has any
reference on how to allow users to upload a file **onto a database**.
In other words, a user can have several related files belonging to
him. *Also, I would need a syntax that allowed me to retrieve those
files.
I'm sure this is possible. *Aside from that information, can anyone
suggest whether this is the proper method? *I know I can simply store
the paths, but starting to juggle various directories is not really my
cup of tea; if there is only one directory to store all the files,
some of them might have the same name, thus creating a conflict. *That
is something I do not need to worry about if everything is stored in a
table image field.
In any case, thank you in advance for your help.
Cindy

http://www.google.com/search?hl=en&q...into+database- Hide quoted text -

- Show quoted text -
Priviet Alexey --

I am capable of searching Google; however, there are a couple of
questions you left unanswered. Namely, is this the proper way of
going about these things? Will the database bloat if there is too
much information in it? Any considerations or suggestions would be
helpful.

Thanks.

Cindy
Mar 8 '08 #3
If you are asking whether file data should be stored in a database, that's
really up to you. Many people store the files on the filesystem and only have
a database entry that points to the file location. Regarding "bloat" that
should not be an issue as long as the table(s) are properly indexed.

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"Cindy" wrote:
On Mar 8, 9:20 am, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Mar 8, 5:31 am, Cindy <cindyc...@hotmail.comwrote:


Hi. I'm using SQL Server 2005. I'd like to know if anyone has any
reference on how to allow users to upload a file **onto a database**.
In other words, a user can have several related files belonging to
him. Also, I would need a syntax that allowed me to retrieve those
files.
I'm sure this is possible. Aside from that information, can anyone
suggest whether this is the proper method? I know I can simply store
the paths, but starting to juggle various directories is not really my
cup of tea; if there is only one directory to store all the files,
some of them might have the same name, thus creating a conflict. That
is something I do not need to worry about if everything is stored in a
table image field.
In any case, thank you in advance for your help.
Cindy
http://www.google.com/search?hl=en&q...into+database- Hide quoted text -

- Show quoted text -

Priviet Alexey --

I am capable of searching Google; however, there are a couple of
questions you left unanswered. Namely, is this the proper way of
going about these things? Will the database bloat if there is too
much information in it? Any considerations or suggestions would be
helpful.

Thanks.

Cindy
Mar 8 '08 #4
On Mar 8, 8:51*pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
If you are asking whether file data should be stored in a database, that's
really up to you. Many people store the files on the filesystem and only have
a database entry that points to the file location. Regarding "bloat" that
should not be an issue as long as the table(s) are properly indexed.

-- Peter
Site:http://www.eggheadcafe.com
UnBlog:http://petesbloggerama.blogspot.com
Short Urls & more:http://ittyurl.net

"Cindy" wrote:
On Mar 8, 9:20 am, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Mar 8, 5:31 am, Cindy <cindyc...@hotmail.comwrote:
Hi. *I'm using SQL Server 2005. *I'd like to know if anyone has any
reference on how to allow users to upload a file **onto a database**..
In other words, a user can have several related files belonging to
him. *Also, I would need a syntax that allowed me to retrieve those
files.
I'm sure this is possible. *Aside from that information, can anyone
suggest whether this is the proper method? *I know I can simply store
the paths, but starting to juggle various directories is not really my
cup of tea; if there is only one directory to store all the files,
some of them might have the same name, thus creating a conflict. *That
is something I do not need to worry about if everything is stored ina
table image field.
In any case, thank you in advance for your help.
Cindy
>http://www.google.com/search?hl=en&q...+database-Hide quoted text -
- Show quoted text -
Priviet Alexey --
I am capable of searching Google; however, there are a couple of
questions you left unanswered. *Namely, is this the proper way of
going about these things? *Will the database bloat if there is too
much information in it? *Any considerations or suggestions would be
helpful.
Thanks.
Cindy- Hide quoted text -

- Show quoted text -
I agree with Peter.

Sharepoint / WSS stores the files in SQL Server (can this be an answer
to the question about proper way? :-) I'm also working at the moment
on a similar application that keeps files saved in the database. I
decided to do this because of easy backup, synchronization and role-
based security.
Mar 10 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom | last post by:
Hi, I'm designing a website that will use XML to store all the content of my web pages. I will use a PHP script to parse the XML. Should I store the XML in a MySQL database or should I simply...
12
by: Ryan Stewart | last post by:
I am in extremely urgent need (by tomorrow) of a way to store files in and retrieve files from an Oracle database using TopLink as an intermediary. I have the JSPs for it, and it works for small...
3
by: Dave Smithz | last post by:
Hi There, Being quite new to MS-SQL I would like to ask if there is a general opinion of what approach should be taken to storing things like external documents and images in databases. ...
5
by: Don Vaillancourt | last post by:
I'm building a system when one can upload a document to the website. I will be storing the document on the hard-drive for quick/easy access, but I was also thinking of storing it in an existing...
0
by: kid4rilla | last post by:
I can successfully write the binary data to an image data type, and successfully retrieve it, but when I attempt to play the file in media player after retrieving it, I get the file type isn't...
6
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to...
6
by: yasodhai | last post by:
Hi, I used a dropdown control which is binded to a datagrid control. I passed the values to the dropdownlist from the database using a function as follows in the aspx itself. <asp:DropDownList...
3
by: RSH | last post by:
Hi, I have a situation where I have created an object that contains fields,properties and functions. After creating the object I attempted to assign it to a session variable so i could retrieve...
1
by: ashishdubey | last post by:
Hi folks I am newbie in this mail api arena.what i am trying to do is storing and retrieving the messages in the database.but whenever i get the message from database and try to preview it(A...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.