Closed Thread
Results 1 to 7 of 7

Thread: Save data question/help please.

  1. #1
    Kim2 is offline Newbie
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    Smile Save data question/help please.

    Hello,

    Iam learing Visual Studio 2008 C# and iam making a window where I can type in how much money i spend each week.

    I want this information to save somewhere so I can see how it changes from week to week.

    My question is, should I connect my form to an database to be able to do this? Or can this be done in other ways?

    Also, what databse should I use if I need one. (a free one ofcourse)

    Thanks,

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    X_Programmer's Avatar
    X_Programmer is offline Learning Programmer
    Join Date
    Dec 2009
    Location
    U.S
    Posts
    89
    Rep Power
    0

    Re: Save data question/help please.

    If it's just an amount can't you save it as a text file?

    When you close the form call up the closing event and save what you wrote on the form to a text file.
    On the formload event load the text file and display the contents in the textbox(or where ever you want to display it).

    If you need more help I can show you some sample code.

  4. #3
    QuackWare is offline Learning Programmer
    Join Date
    Jan 2010
    Posts
    95
    Rep Power
    8

    Re: Save data question/help please.

    If you don't want to have to save it to an outside file like a text file you can look into using the Resources section of your application (Pretty easy if you use Visual Studio 2008). This still creates a file but one out of reach for the average user of your program.

  5. #4
    QuackWare is offline Learning Programmer
    Join Date
    Jan 2010
    Posts
    95
    Rep Power
    8

    Re: Save data question/help please.

    If you don't want to have to save it to an outside file like a text file you can look into using the Resources section of your application (Pretty easy if you use Visual Studio 2008). This still creates a file but one out of reach for the average user of your program.

  6. #5
    Delever is offline Newbie
    Join Date
    Mar 2010
    Posts
    3
    Rep Power
    0

    Re: Save data question/help please.

    You can use SQLite for small database. Well, if you know SQL or after you learn it of course

    csharp-sqlite - Project Hosting on Google Code

  7. #6
    cdg10620's Avatar
    cdg10620 is offline Programming Expert
    Join Date
    Jun 2009
    Location
    Texas
    Posts
    387
    Blog Entries
    3
    Rep Power
    12

    Re: Save data question/help please.

    If I was doing something like that and I didn't want to use a database I would serialize the data and save it in an xml page. That makes working with strongly typed objects very simple in C#.
    -CDG10620
    Software Developer

  8. #7
    gokuajmes's Avatar
    gokuajmes is offline Programming God
    Join Date
    Jan 2010
    Location
    India
    Posts
    516
    Blog Entries
    5
    Rep Power
    12

    Re: Save data question/help please.

    try this dude

    1.Open Notepad

    2.Type in the .LOG as the first line , save and close it

    3.Reopen the file you will have Date and Time prefixed to the current line.

    4.Go ahead and type the ammount spent. thats it. ;D

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to always save data in running pgm Folder
    By vern in forum Pascal and Delphi
    Replies: 0
    Last Post: 10-26-2010, 07:33 AM
  2. save data after close the program
    By eman ahmed in forum Java Help
    Replies: 2
    Last Post: 09-29-2010, 05:15 PM
  3. how to save data in ms-excel file by using php FORM'S ????
    By hamayun_4u2004 in forum PHP Development
    Replies: 4
    Last Post: 04-27-2010, 01:12 PM
  4. Save/Load Data?
    By slovig in forum Visual Basic Programming
    Replies: 2
    Last Post: 03-04-2008, 03:07 PM
  5. save data
    By roger in forum Visual Basic Programming
    Replies: 1
    Last Post: 05-28-2006, 06:35 AM

Tags for this Thread

Bookmarks

Posting Permissions

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