Reference to files in SQL database Web App

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • grzybek

    Reference to files in SQL database Web App

    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


  • Kevin Spencer

    #2
    Re: Reference to files in SQL database Web App

    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.

    "grzybek" <nospam_grzybek @gze.pl> wrote in message
    news:bskq2l$tsh $1@news2.ipartn ers.pl...[color=blue]
    > 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[/color]
    ,[color=blue]
    > but I doubt it )
    >
    > Any others idea ? Any example in C#.
    >
    > Thanks in advance.
    >
    > [ ASP .NET, C#, SQL Server 2000 )
    >
    > Best Regards,
    > grzybek
    >
    >[/color]


    Comment

    Working...