storing files in sql server 2000

  • hi Friend,

    Please help me, how to store files (excel,doc,ppt) in sql server 2000 using query or manually.

    Thanks,

    Kalidasan 😎

  • Basically you need two things to do that:

    1. A table to store your data. The table must have a column of the appropriate type (varbinary(n) or varbinary(MAX))

    2. A piece of code to store the file.

    If you are interested, I can provide some samples in different languages (Java, VB6, ...).

    Let me know

    Gianluca

    -- Gianluca Sartori

  • Check out.

    http://msdn.microsoft.com/en-us/library/aa173839(SQL.80).aspx

    Regards
    Shrikant Kulkarni

  • ok please give me..

    can i get the piece of code in asp or vb or .net

  • Hi,

    I will suggest not to store the files in SQL Server 2000. Only store the path of the file in a row. That means you need to design your application and database in such a way that whenever you are getting any files, you should have codes in place to move/ftp the file to application server and store application server path in database. this approach will provide you better maintainability and easy to implement.

    In case you want to test how to store files in SQL Server 2000, you can use Text Data type.

  • The best design to accomplish tasks always depends on what you have to do: I had to face situations when storing the file directly in the database was the only way. Just to give an example, when you create a report with Crystal Reports, it looks like loading files from db is much faster than reading from disk.

    I can't fnid my code in VB right now, I got it in Java if you want, or maybe you want to check this post from vbforums:

    http://www.vbforums.com/showthread.php?t=376767

    Regards

    Gianluca

    -- Gianluca Sartori

  • I found another one from Microsoft:

    http://support.microsoft.com/default.aspx?scid=kb;en-us;194975

    -- Gianluca Sartori

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply