Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. save and retrieve files

save and retrieve files

Scheduled Pinned Locked Moved Visual Basic
databasetutorialcsharphtml
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    len_ems
    wrote on last edited by
    #1

    good afternoon. i'm currently using vb.net and sql server. i just want to ask advice or guidance on how to save microsoft office documents(.doc,.xls,.vsd,.ppt), text files, and html documents, etc. in the database and if i open one of the files, example is a word document, the document will open in the same format as in the ms word. what appropriate tools should i use? i'm thinking of the saving pictures in blob format but i don't if it is applicable... thanks in advance...

    R T 2 Replies Last reply
    0
    • L len_ems

      good afternoon. i'm currently using vb.net and sql server. i just want to ask advice or guidance on how to save microsoft office documents(.doc,.xls,.vsd,.ppt), text files, and html documents, etc. in the database and if i open one of the files, example is a word document, the document will open in the same format as in the ms word. what appropriate tools should i use? i'm thinking of the saving pictures in blob format but i don't if it is applicable... thanks in advance...

      R Offline
      R Offline
      Ritesh1234
      wrote on last edited by
      #2

      Hi, If u r thinking to save Files in dB than better u set Column's datatype as image........ u can easily convert the file into array of bytes as Dim reader As New FileStream(strFileName, FileAccess.ReadWrite) ReDim pi_arrbyteFiles(reader.Length - 1) reader.Read(pi_arrbyteFiles, 0, pi_arrbyteFiles.Length) reader.Close() When u want so save the file back on the m/c u can call Dim strWrites As FileStream If File.Exists(strFileName) Then File.Delete(sfdFile.FileName) End If strWrites = File.Create(strFileName) strWrites.Write(pi_arrbyteFiles, 0, arrbyteFiles.Length - 1) strWrites.Close() End If Regards, Ritesh

      L 1 Reply Last reply
      0
      • L len_ems

        good afternoon. i'm currently using vb.net and sql server. i just want to ask advice or guidance on how to save microsoft office documents(.doc,.xls,.vsd,.ppt), text files, and html documents, etc. in the database and if i open one of the files, example is a word document, the document will open in the same format as in the ms word. what appropriate tools should i use? i'm thinking of the saving pictures in blob format but i don't if it is applicable... thanks in advance...

        T Offline
        T Offline
        T Manjaly
        wrote on last edited by
        #3

        Here is an article which talks about this: http://www.dotnetspider.com/technology/kbpages/558.aspx[^] :zzz:----------------------------------------------------------------------:(( T Manjaly My C# Tutorials articles www.dotnetspider.com

        L 1 Reply Last reply
        0
        • R Ritesh1234

          Hi, If u r thinking to save Files in dB than better u set Column's datatype as image........ u can easily convert the file into array of bytes as Dim reader As New FileStream(strFileName, FileAccess.ReadWrite) ReDim pi_arrbyteFiles(reader.Length - 1) reader.Read(pi_arrbyteFiles, 0, pi_arrbyteFiles.Length) reader.Close() When u want so save the file back on the m/c u can call Dim strWrites As FileStream If File.Exists(strFileName) Then File.Delete(sfdFile.FileName) End If strWrites = File.Create(strFileName) strWrites.Write(pi_arrbyteFiles, 0, arrbyteFiles.Length - 1) strWrites.Close() End If Regards, Ritesh

          L Offline
          L Offline
          len_ems
          wrote on last edited by
          #4

          good morning... thank you very much for the advice... more power...

          1 Reply Last reply
          0
          • T T Manjaly

            Here is an article which talks about this: http://www.dotnetspider.com/technology/kbpages/558.aspx[^] :zzz:----------------------------------------------------------------------:(( T Manjaly My C# Tutorials articles www.dotnetspider.com

            L Offline
            L Offline
            len_ems
            wrote on last edited by
            #5

            good morning... thank you for sharing me the site.....

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups