Results 1 to 9 of 9

Thread: saving to the regestry?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    91

    saving to the regestry?

    right now, i am working with textfiles (very innefficiant...) how do i save stuff onto the regestry????

  2. #2
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    This is the method I use. It works fairly well.

    Encrypt and write registry values
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  3. #3
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    PS: I know the sample only shows connection strings but it can be modified to save other info also. The nice part is it's encrypted so you can keep sensative info there aswell.
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: saving to the regestry?

    Originally posted by Synth3t1c
    right now, i am working with textfiles (very innefficiant...) how do i save stuff onto the regestry????
    Actually, if done correctly, a textfile should be more efficient. It would also be easier for users to take settings with them when they format or go from computer to computer.

  5. #5
    Addicted Member MasterBlaster's Avatar
    Join Date
    Jul 2002
    Location
    Seattle
    Posts
    196
    I've used both and there really isn't that much of a difference. in performance between the registry and text files. I only use the registry because I don't want users to be able to take/read the text files for security reasons. Using the app.config to hold key value pairs for config info works pretty well also if hiding your config info is not important to you. Lemme know I have the code for that also.
    "And most of the evils of society can, in fact, be cured through information. We have a society that has been disinformed and based on the disinformation has made irrational choices. And that's what I mean by 'ignorance.' People, who ordinarily might be smart, are deprived of the data by which to make a rational decision, don't have the data to do it."
    Frank Zappa

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    91
    actually, text files would be easier. here, im writting a gradebook program. i can make it from the period choice, to the student names (including loading and saving student names) and then thats it... i want it to be able to load a table, but since theres no such thing....

  7. #7
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Synth3t1c
    i want it to be able to load a table, but since theres no such thing....
    You're gonna throw it into the registry? bleh!

    Throw it into an XML file. Or a spreadsheet. Hell, you don't have to have it in table form when saved, just when it is displayed.

    You could even serialize whatever you are using as a table to save it.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    91
    Originally posted by kasracer


    Throw it into an XML file. Or a spreadsheet. Hell, you don't have to have it in table form when saved, just when it is displayed.
    i want them to be able to have a table form inside the program! teach me teacher!

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    91
    bump

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width