Which tools I need for my program

Started by
17 comments, last by _moagstar_ 12 years, 9 months ago
Actually I already made a program like this before for my friend. my mistake was I didn't need a Server-based database which I just copied from an youtube tutorial. I just asked her how many records are there now in the database, and she said 1k+. Omg what am I gonna do if something happens to the program and all those records got lost. I was just trying to help her with their small business.

Here's what I remembered doing. Maybe you guys can identify how I can fix this or you can give ideas on how to avoid the same mistake.
1. I used Visual Studio
2. I made a VB Windows Forms Application
3. I made a Service-Based Database called Database1.mdf which is a Dataset Model
4. I chose save connection string to Database1ConnectionString
5. Dataset name is Database1Dataset
6. I added a table to the database and put stuff in the Columns and data types.
7. I then added it to the Data Source.
8. I then dragged from the Data Source, each column to the forms so they have a Label: Textbox
9. Then dragged again to get a datagrid view.
10. Edited the forms to have better looking add, new, save, previous, next buttons and added a simple search using filter.
11. Then I published it to my computer. After testing, I archived it then sent to my friend.
12. She installed it and is now using it.

She was glad with how simple it was cause I made it with Visual Studio. Now I dunno how to export the database file from her computer/copy of program to make a backup. I dunno what to do.
I know I didn't ask for anything in return but if the program messes up I'd feel bad. 1k+ records already jesus christ and the program has like 74 columns/textboxes. Someone help please.

BTW the DataBindingSource is the thing that connects the textbox to the database.

EDIT:

OMG she says she's just going to add all the records for this year and tells me it could reach 15k or more records total this July. Holy shit I'm just a newbie programmer what the hell did I get myself into. I just copied stuff from youtube so I can make her a program.

Someone please help me with making a new program. With that amount of records, what database should I use? The important thing is it's easy to use like how I made it with Visual Studio. Or am I panicking too much and 15k records is nothing?

I don't mind re-creating the program.
Advertisement

Actually I already made a program like this before for my friend. my mistake was I didn't need a Server-based database which I just copied from an youtube tutorial. I just asked her how many records are there now in the database, and she said 1k+. Omg what am I gonna do if something happens to the program and all those records got lost. I was just trying to help her with their small business.

Here's what I remembered doing. Maybe you guys can identify how I can fix this or you can give ideas on how to avoid the same mistake.
1. I used Visual Studio
2. I made a VB Windows Forms Application
3. I made a Service-Based Database called Database1.mdf which is a Dataset Model
4. I chose save connection string to Database1ConnectionString
5. Dataset name is Database1Dataset
6. I added a table to the database and put stuff in the Columns and data types.
7. I then added it to the Data Source.
8. I then dragged from the Data Source, each column to the forms so they have a Label: Textbox
9. Then dragged again to get a datagrid view.
10. Edited the forms to have better looking add, new, save, previous, next buttons and added a simple search using filter.
11. Then I published it to my computer. After testing, I archived it then sent to my friend.
12. She installed it and is now using it.

She was glad with how simple it was cause I made it with Visual Studio. Now I dunno how to export the database file from her computer/copy of program to make a backup. I dunno what to do.
I know I didn't ask for anything in return but if the program messes up I'd feel bad. 1k+ records already jesus christ and the program has like 74 columns/textboxes. Someone help please.

BTW the DataBindingSource is the thing that connects the textbox to the database.

Just export the sql as comma separated vectors and create a nice and solid function to read it back into your new program.

With all 40-character ANSI strings (which is probably overkill), 74 columns and 1000 entries, the dataset will not exceed 24 MB, so you're good even on last-millennium machinery. ;-)

If that's all it's much simpler to, like ApochPiQ said, just implement a datastrucure to contain that yourself.
Just remember to back up your files to a remote machine and you should be good. :-)


EDIT: Yes, even with >15k records it will be fine. An existing db would help fetch entries from many different expressions, and sort easily,
but in the end its likely that it will be easier to do it yourself. Those processes may take longer, but storage wise 15k doesn't sound like anything you should be worried about.

Just export the sql as comma separated vectors and create a nice and solid function to read it back into your new program.

With all 40-character ANSI strings (which is probably overkill), 74 columns and 1000 entries, the dataset will not exceed 24 MB, so you're good even on last-millennium machinery. ;-)

If that's all it's much simpler to, like ApochPiQ said, just implement a datastrucure to contain that yourself.
Just remember to back up your files to a remote machine and you should be good. :-)


EDIT: Yes, even with >15k records it will be fine. An existing db would help fetch entries from many different expressions, and sort easily,
but in the end its likely that it will be easier to do it yourself. Those processes may take longer, but storage wise 15k doesn't sound like anything you should be worried about.



How do I export the sql as comma separated vectors? Can you give me a simple pseudocode for the function to read it back to the program?

Also how do I do ApochPiQ's suggestion? Can I do that using Visual Studio?
Sure, its basic file I/O programming. What language are you intending to use, -Visual Studio have a few:
This link point to many articles and/or threads concerning reading files with C++.
My suggested pseudocode is

datastructure entry
eye color :)
patient name
ssc

load function
read file (file_name)
for every line in file
split on comma
you know what columns come when, so you can just read every field into your datastructure for a single entry


A comma separated file can be exported through Visual Studio in the section for your database.
When you say Visual Studio, which language in particular are you going to be using to implement this?

When you say Visual Studio, which language in particular are you going to be using to implement this?


I used Visual Basic. If I have to recreate should I switch to Visual C#? I need to use these Visual stuff to make it easier for me and my friend.

btw guys here's how the program looks like. those are the tabs. dunno how to export the database though, or how to make it exportable next time when I recreate it.
2zgyvkk.png

I used Visual Basic. If I have to recreate should I switch to Visual C#? I need to use these Visual stuff to make it easier for me and my friend.



I don't think that is necessary if you've already made some substantial progress using VB and you are comfortable working in that environment. I assume you are filling some kind of data structure with the information from each of these fields? Perhaps this will give you some ideas about how you can implement serialisation / deserialisation.
guys as you can see in my program(screenshot) what do you think I should use? it's going to be used on one computer only and accessed by one person. Patient records could reach 20k. I want it to have forms btw so it's easy for the user who is not good with computers. i'm not good with terminologies so I don't know what to use. Database? Serialization? Sqlite? File-based Database? What do you think?

Edit:
I could try _moagstar_'s suggestion http://www.functionx.com/vbnet/fileprocessing/serialization.htm
or this one http://www.c-sharpcorner.com/UploadFile/afenster/185/.

guys as you can see in my program(screenshot) what do you think I should use? it's going to be used on one computer only and accessed by one person. Patient records could reach 20k. I want it to have forms btw so it's easy for the user who is not good with computers. i'm not good with terminologies so I don't know what to use. Database? Serialization? Sqlite? File-based Database? What do you think?

Edit:
I could try _moagstar_'s suggestion http://www.functionx...rialization.htm
or this one http://www.c-sharpco...e/afenster/185/.



Serialization is the process of converting your in-memory objects into a form which can be transferred, and then later deserialised so that you get the same objects back again. The exact transfer process could be for example transferring the data to your filesystem or transferring the data across a network. For your purposes you are interesting in storing the objects you have in memory into a file for backup. You could use sqlite for this, but as others have pointed out it's overkill, and I wouldn't complicate this more than you need to.


Like I said, I assume that you are filling some kind of data structure (a dictionary?) with a record for each patient that holds information from those forms, what you need to do is write two functions...serialise and deserialise for this data structure. The serialise function is responsible for taking each of those patient records and writing them to a file in some form, for example your patient database file could look like this:

Name="Bill Bailey" Address="1 Funny Road, England" [more fields go here]
Name="Paddington Bear" Address=[font="Arial"]"[size=2]32 Windsor Gardens" [more fields go here][/font]
[font="Arial"][size=2][more records go here][/font]
[font="Arial"][size=2]
[/font]
[font="Arial"][size=2]Then your deserialise function takes each of those patient records and rebuilds the dictionary that you had before.[/font]
[font="Arial"][size=2]
[/font]
[font="Arial"][size=2]The example I show here is using a crude text based serialisation scheme, but how you store the data is up to you, comma seperated, xml or even binary if you want to reduce the size of your file.[/font]
[font="Arial"][size=2]
[/font]
[font="Arial"]If you couldn't already tell, my suggestion is to leave sqlite to one side until you need to do something more complicated and figure out how to serialise/deserialise the data you already have.[/font]
[font="Arial"]Good luck![/font]

This topic is closed to new replies.

Advertisement