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,
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.
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.
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.
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
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks