Reference to files in SQL database Web App

G

grzybek

Hi,
I have question about techniques of using files
in SQL Server in Web Application.
Assuming that I send files from my Web App ( client )
to server and located these files on hard disk ( on server ),
I'd like to view these files and I want to have possibilities
to open it.
How can I do it ?

My only one idea is :
In table in database I should put path to specific file ?
And then I know reference to specific file connecting to
display name.
( Unless I can put files in database, not disk? I'm not good at SQL yet ,
but I doubt it )

Any others idea ? Any example in C#.

Thanks in advance.

[ ASP .NET, C#, SQL Server 2000 )

Best Regards,
grzybek
 
K

Kevin Spencer

You have several options, depending upon the specifics of your requirements.

1. Store the path the files in the database. Very efficient
2. Store the files in the database. Very inefficient
3. Don't use a database. Just use the file system. Most efficient, however,
depending upon your requirements, this could be good or bad. For example, if
all of the files in a folder were downloadable, you could simply use the
System.IO namespace to work with the file system, creating a link to each
file in a page dynamically. If, however, there are a large number of files,
and you want to be able to search on them, or some of the files in the
folder should not be downloadable, this would not be your best choice.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top