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. Saving Data

Saving Data

Scheduled Pinned Locked Moved Visual Basic
7 Posts 4 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.
  • T Offline
    T Offline
    tibmark
    wrote on last edited by
    #1

    What is the best way to store a small amount of data that the user does not have access to? I don't want to have to worry about licensing. Just need to store data from a listbox that is retrieved on startup. I mainly work with a SQL server 2005 backend that has tens of thousands of entries. I am developing my own app that I would like to distribute.

    Mark Thibodeaux

    D L 2 Replies Last reply
    0
    • T tibmark

      What is the best way to store a small amount of data that the user does not have access to? I don't want to have to worry about licensing. Just need to store data from a listbox that is retrieved on startup. I mainly work with a SQL server 2005 backend that has tens of thousands of entries. I am developing my own app that I would like to distribute.

      Mark Thibodeaux

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Your question isn't very clear. Are you saying that this application uses an SQL Server or you application needs one and you're looking for a smallish SQL Server?? Or, are you looking to store a small amount of information somewhere and you want to know the best place to put it??

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008

      T 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Your question isn't very clear. Are you saying that this application uses an SQL Server or you application needs one and you're looking for a smallish SQL Server?? Or, are you looking to store a small amount of information somewhere and you want to know the best place to put it??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

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

        the latter, looking to store data, need to know where to put it. I was trying to explain at my job I work with large amounts of data, don't know much about storing small amounts of data.

        Mark Thibodeaux

        D 1 Reply Last reply
        0
        • T tibmark

          What is the best way to store a small amount of data that the user does not have access to? I don't want to have to worry about licensing. Just need to store data from a listbox that is retrieved on startup. I mainly work with a SQL server 2005 backend that has tens of thousands of entries. I am developing my own app that I would like to distribute.

          Mark Thibodeaux

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          tibmark wrote:

          What is the best way to store a small amount of data that the user does not have access to

          In the file system, for the user to be able to save the data somewhere they must have access (permissions) to it. I'd suggest making a directory for your program under the user's "Application Data" directory. (Could also use the user's registry if the number of list items isn't too excessive.) I guess you could encrypt the files' contents or registry keys if you really didn't want the user to be able to read the files outside your program.

          T 1 Reply Last reply
          0
          • L Lost User

            tibmark wrote:

            What is the best way to store a small amount of data that the user does not have access to

            In the file system, for the user to be able to save the data somewhere they must have access (permissions) to it. I'd suggest making a directory for your program under the user's "Application Data" directory. (Could also use the user's registry if the number of list items isn't too excessive.) I guess you could encrypt the files' contents or registry keys if you really didn't want the user to be able to read the files outside your program.

            T Offline
            T Offline
            tibmark
            wrote on last edited by
            #5

            what kind of file? .txt?

            Mark Thibodeaux

            A 1 Reply Last reply
            0
            • T tibmark

              what kind of file? .txt?

              Mark Thibodeaux

              A Offline
              A Offline
              A Wong
              wrote on last edited by
              #6

              You can store as a config or an xml by the sound of what you want to do.

              1 Reply Last reply
              0
              • T tibmark

                the latter, looking to store data, need to know where to put it. I was trying to explain at my job I work with large amounts of data, don't know much about storing small amounts of data.

                Mark Thibodeaux

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                In that case, I'd say store the data as an XML file in the users Application Data folder. If you need to store the data for multiple users on the same machine, use the Common Application Data folder. You can build the path to the file using the Environment.GetFolderPath[^] method using an appropriate SpecialFolder[^] enum value and the Path.Combine[^] method. There are various methods for building a XML file, from using XmlDocument to file stream methods to the very easy DataSet/DataTable WriteXml methods.

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007, 2008

                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