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