how to use values from my database

wicked14

Member
Joined
Feb 13, 2012
Messages
9
Programming Experience
Beginner
how to use values from my database, as values for my variables. i have table named Rates and containing fields PerMinute and Amount
how can i get the specific values from the fields example PerMinute 10 = Amount 20
and i have a condition
if Minute = 10 then
amountTopay.text= Amount in database

im quite new in database hope you can help me
thanks in advance
 
Hello I think for what you want to do you need to be looking at DataGridViews, DataSet's and BindingSources. These will allow you access to your database tables. They will allow you to get data from the tables and manipulate and save that data.

The DataGridView gives you a visible object to view your data, The DataSet is the retrieved data from your database, so if your SQL was SELECT * FROM TableName the dataset would hold all of the data in TableName and last but not least the BindingSource, this as the name suggests binds (connects) the table to it so that it can then be used in the datagridview. Have a look at these and find some examples. I think that you will find that they are not too hard to work with.

Good luck
 
Back
Top