i'm doing a budget calculator for my assignment.
and now i'm facing the problem about how to load or save the data i type in the textbox into mdb...? i already had one simple mdb for login process...(containing username and passwords) i hope to do sth like when User A login, he can see his last month budget and then he can create a new one for next month. does this require another database..? or how to link with the user that log on? it's sth like what i draw here: (but i got stuck at the login there..-.-) hope anyone can help me please... thanks..

p/s: i'm using visual basic 2005 express edition

Recommended Answers

All 8 Replies

Hoon, read in Database and ADO.NET
if I answered your question I'll solve your assignment!!

but is it only one database is needed...? or two..? now i'm having 1 for username and password,(this is working) i try adding data i wanted into the fields but when i try the program.. even though i use different user to login, but it read all the same data.. -.-" i mean like when i login with user A it reads tuition fee = 1000 when i log in user B it also reads tuition fee = 1000 (although i key in the different number at the row of user B)

you'll have two tables one for user and the other for budget and the relationship is one-to-many.

i'm doing a budget calculator for my assignment.
and now i'm facing the problem about how to load or save the data i type in the textbox into mdb...? i already had one simple mdb for login process...(containing username and passwords) i hope to do sth like when User A login, he can see his last month budget and then he can create a new one for next month. does this require another database..? or how to link with the user that log on? it's sth like what i draw here: (but i got stuck at the login there..-.-) hope anyone can help me please... thanks..

p/s: i'm using visual basic 2005 express edition

Does your budget information placed on another table? If yes, does the table have a field Date when Transaction (Budget) was Created. Does the table a field to store who Created the budget? From these two information you can create your filtering criteria and retrieve the information you want thru the Date Transaction (Budget) was Created field and who Created the budget field.

Hope this will help.

can i have just one table and have all the data inside it? because i donno how to 'link' the username. i mean like when i create a new user inside the program it'll add the new entry only to one table but not two :(

you can add data to another table
please take just 10 minutes and read in ADO.NET!!!

You Can read and download more .NET Database related articles here on coderewind

can i have just one table and have all the data inside it? because i donno how to 'link' the username. i mean like when i create a new user inside the program it'll add the new entry only to one table but not two :(

You can use only one database with several tables inside. Your first table will contain your login information (UserID, PWord, AccLvl, DateCreated). Next Table will contain your Budget information (BudgetID, Description, DateCreated, AmountAllocation, SpreadFactor, ).

A SpreadFactor is a set of numbers, one for each period of the year, which fixes the relative proportions of budgets for those periods. Using SpreadFactors, you can create a budget for an account by deciding on the total annual amount and spreading it across the year according to the fixed set of ratios. For example, you have allocated for your budget $ 12,000.00, if your SpreadFactor if even, then you have $ 1,000.00 each month from January to December. Or you can remove the spreadfactor and enter an amount for each month of the year, which means you have to have another table for your monthly budget.

It is possible to enter a budget for an account, or even an entire General Ledger budget, without using spreadfactors. This is referred to as budgeting by period. Budgeting by period is the opposite of budgeting by year. Rather than entering a total amount and dividing it into periods, the required budgets for each period are entered separately and added to give the total annual amount. Example of this table would be (AccountCode, AccountDescription, AnnualAmount, DateCreated, BudgetID). It dependents on how you make your budget.

Next Table will link the two tables (BudgetID, UserID). Normalize your tables to make it manageable and eliminating redundant information. From the tables, you can extract information by using the JOIN statement.

I hope this helps?

If you want, based on the explaination above, give me the details of what your budget calculator would be used for? What exactly do you want to attain and I can give you the tables that you need. And how to go about this tables, what criteria to look at, and how to use SQL Statements.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.