Skip to main content

Database Programming Made Easy

Body

In this tutorial I will discuss to you on how you can access the database easily. I came across this idea because this is also my problem when I started working with database programming.

I hope that in one way or another I can help you in your journey to the world of programming. Programming is fun and easy if you just simply devout your time with it. I cannot stress enough how easy programming is if you only read an online tutorial like this.

Take It Easy

Just don’t be rush in learning programming. Take it easy and study everyday. Don’t start right away thinking that you can create a system like payroll, accounting, hotel reservation, point of sale without even having a single knowledge about database programming.

Learning by Doing

Learning by doing is the next thing. You need to practice what you learn. In this tutorial I encourage you to take the sample code into practice.

I will list below the content that I am going to discuss. This is a series of tutorial so be sure to visit the site regularly or subscribe to my Feeds at the right side bar.

I will arrange the topic according to their importance, that is, what to do first before you jump ahead to the next topic. Along the way, I will add a topic before or after other topic or whatever that will come to my mind that I know a must have tutorial.

Table of Contents

  1. Making Database Connection
  2. How to Retrieve Data
    1. Using Data Reader
    2. Using Datasets and Data Adapters
  3. How to Modify Data
    1. Using ExecuteNonQuery
    2. Using Datasets and Data Adapters
  4. Windows Forms
    1. How to Retrieve and Save Data using TextBox Control
      1. Using Data Readers and ExecuteNonQuery
      2. Using Datasets and Data Adapters
    2. ComboBox Control
    3. ListView Control
    4. DataGridView Control
    5. CheckBox Control
    6. TreeView Control
  5. How to Print Using Crystal Reports

If you’d like to suggest a topic, don’t hesitate to write a comment below.

Comments

Submitted bysafranson Fri, 12/04/2009 - 00:17

Dear Sir, Please send me a Visual Basic 6.0 Database. and WindowXPC Engine Learning Guide for Me.....?????
Submitted byAnonymous (not verified)on Sun, 12/20/2009 - 22:26

hi is it possible to have a datepicker inside data grid? if you know pls make tutorial. tnx
Submitted byAnonymous (not verified)on Tue, 12/29/2009 - 09:56

select a date form datetimepicker class and add some months to that patricular date . it depends up on the day, month and year also check the leap year . [email protected]
Submitted bycedon Mon, 01/11/2010 - 16:05

im creating an examination system in vb.net i can do it in vb 6.0 to retrieve question using ADODB.RECORDSET but our instructor dont want it.. Further explain and post some code here that retrieve data in the database and post it on a label or richtextbox for the question and choices.. I think i need to use datareader but i dont know how to do it... add: i need also a navigation like NEXT and PREVIOUS for the question.. I did it in vb 6.0 using rs.movenext , .moveprevious. need iT
Submitted byAnonymous (not verified)on Wed, 01/20/2010 - 11:14

gud day..sir were associate it student..We need your help in making a student record system using vb 6.0 and microsoft access for our project were rush in time.. tnx for your time to read our problem...
Submitted bycedon Thu, 01/21/2010 - 14:16

In reply to by Anonymous (not verified)

hi guys u can try my code... student information same with student records uve looking for =) hope u like it. http://www.sourcecodester.com/visual-basic/student-information.html
Submitted byAnonymous (not verified)on Fri, 02/05/2010 - 12:53

In reply to by ced

hi,,im an it student can you make a library system using VB 6.0?

I have. Contact me if you like 09087076539 or 09327081978
Submitted byAnonymous (not verified)on Mon, 03/08/2010 - 11:27

In reply to by Anonymous (not verified)

hi i need patient recording system in a certain Health Center.. i need a source code using visual basic.. can u help me.? email us at [email protected]
Submitted byAnonymous (not verified)on Mon, 02/15/2010 - 11:50

morning, i am an It Student doing my final year, my project is an online hotel reservation system, is it possible to link a website and a database, so that customer bookings can be stored on the database and am using database server 2008 is it ok to use it, my email address [email protected]

SQL server is very powerful database.. but mas secure ORACLE.. online hotel reservation system? ouch but online pa kasi hehehe.. "is it possible to link a website and a database" -possible poh un hehe just imagine "FS,FB" but i think ORACLE ung gamit sa mga don..
Submitted byAnonymous (not verified)on Sun, 11/21/2010 - 19:21

In reply to by Anonymous (not verified)

Please i want to develop a database and use php to create the interface.I want to create the database to store customer name,account details.and that of employer and employees. Can you please help me with the code for php and mysql. kindly send the codes to : [email protected], [email protected]
Submitted byAnonymous (not verified)on Wed, 03/10/2010 - 19:07

Sir admin. Im waiting for the examination System in vb.net ahmp. need it. please post some.. tnx
Submitted byAnonymous (not verified)on Sun, 03/14/2010 - 15:18

thank you
Submitted byAnonymous (not verified)on Sun, 05/02/2010 - 19:17

im trying to make my access database to go online... is it possible can anyone share some views? please any ideas will help.... my email add is [email protected] thanks haev
Submitted byakinyemion Tue, 05/11/2010 - 14:02

Hello Sir, I want to learn how to write Accounting Program either in Visual Basic 6 or Java. I am an Accountant by profession. The purpose of my learning is that I will be able to write Accounting Program since I am an Accountant. Accounting Program is very scarce on programming forums. Please help me. Thank you. Akinyemi
Submitted byAnonymous (not verified)on Thu, 05/20/2010 - 18:36

thanks
Submitted byAnonymous (not verified)on Mon, 05/31/2010 - 22:16

hi..i need ur help.I want to create an inventory for storing purchasing items and update balanced automatically reminds that user need to purchase new item if the balance less than the minimum number. Can i use ur tutorial as a guideline?Do i stil need to use the microsoft access?I'm totally blur for now. Thank you.
Submitted byAnonymous (not verified)on Wed, 06/09/2010 - 04:47

I'm student of Bscs and I've to make a project on hotel reservation system in c++ .I'm making it myself but I'm not suceeding in what I want to do .If any one have this project then send it to me on my email id : [email protected] Admin plz help me out as soon as possible
Submitted byAnonymous (not verified)on Sat, 07/03/2010 - 17:44

I want to know how I can design a program or a data base with reports on STUDENT PAYMENT SYSTEM.
Submitted byadrian09on Wed, 07/21/2010 - 21:11

can you give me some sample system easy to defend and make????please,thanks in advance :)
Submitted byAnonymous (not verified)on Fri, 07/30/2010 - 19:23

hi god day i am a beginner in creating programs can i ask your help about changing may user name and password using VB 6.0 her is may codes Module ublic Function isValidPassword(passwd As String, usrd As String) As Boolean Dim rstAccount As ADODB.Recordset Dim strSQL As String Dim isLoggedIn As Boolean strSQL = "SELECT [ID],[password],[User] FROM [accounts] WHERE [password]='" & passwd & "' AND [User]='" & usrd & "'" Set rstAccount = cnnInventory1.Execute(strSQL) If rstAccount.EOF Then isLoggedIn = False Else If StrComp(passwd, rstAccount!Password, vbBinaryCompare) = 0 And StrComp(usrd, rstAccount!User, vbBinaryCompare) = 0 Then isLoggedIn = True Else isLoggedIn = False End If End If If isLoggedIn Then isValidPassword = True Else isValidPassword = False End If rstAccount.Close Set rstAccount = Nothing End Function My Login Codes is Ok but in the Mudel is not ok thier is an error pls..help me to solve my problem Dim counter As Integer Private Sub Command1_Click() Dim rstAccount As ADODB.Recordset Dim strSQL As String Dim isLoggedIn As Boolean strSQL = "SELECT [ID],[User],[Password] FROM [accounts] WHERE [Password]='" & txtPassword.Text & "'AND [User]='" & txtUser.Text & "'" Set rstAccount = cnnInventory1.Execute(strSQL) If txtUser.Text = "" Then Call MsgBox("Please enter your userName and Password", vbCritical, "Blank User") Exit Sub Else If txtPassword.Text = "" Then Call MsgBox("Please enter your userName and Password", vbInformation, "Blank Password") Exit Sub Else If rstAccount.EOF Then isLoggedIn = False Else If StrComp(txtPassword.Text, rstAccount!Password, vbBinaryCompare) = 0 And StrComp(txtUser.Text, rstAccount!User, vbBinaryCompare) = 0 Then isLoggedIn = True Else isLoggedIn = False End If End If End If End If If isLoggedIn Then cnnInventory1.Close Unload Me Call MsgBox("Welcome to my program.", vbInformation, "Authorization Successful") ' frmMain.mnuUtility.Enabled = True 'frmMain.mnuNewProd.Enabled = True ' frmSalesRecord.Command1.Enabled = True frmMain.Show vbModal Else 'Call MsgBox("Authorization failed.", vbExclamation, "Authorization failed.") Call MsgBox("Error.", vbCritical, "Error.") counter = counter + 1 txtUser.Text = "" txtPassword.Text = "" txtUser.SetFocus End If If counter > 2 Then Unload Me End If End Sub Private Sub Command2_Click() End End Sub Private Sub Form_Load() Open_Conn End Sub Private Sub Image1_Click(Index As Integer) Unload Me End Sub Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Call Command1_Click End If End Sub Private Sub txtUser_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Call Command1_Click End If End Sub
Submitted byAnonymous (not verified)on Tue, 08/03/2010 - 20:34

good evening sir/madam can you please help me to my thesis topic. my topic is online grading system of our school. what program language that can i used in this topic? tnx
Submitted byAnonymous (not verified)on Tue, 08/03/2010 - 20:38

can I use PSP FOR ONLINE GRADING SYSTEM?
Submitted byAnonymous (not verified)on Sun, 08/08/2010 - 21:15

Sir, Can you explain about each connection code. For example: what is "OleDbConnection" doing, what is OleDbadapter doing?, what is dataset doing like that. My emai id is [email protected]
Submitted byAnonymous (not verified)on Tue, 08/10/2010 - 20:00

hello sir , iam a csc student ,i need a project in hotel management using database structure.any one having this please send it to my email id- [email protected] plzzzzzzzzz send it.iam waiting for your response.please reply.
Submitted byAnonymous (not verified)on Tue, 08/10/2010 - 20:00

hello sir , iam a csc student ,i need a project in hotel management using database structure.any one having this please send it to my email id- [email protected] plzzzzzzzzz send it.iam waiting for your response.please reply.
Submitted byAnonymous (not verified)on Sat, 08/21/2010 - 13:40

hi! sir, i need your help how to create on-line grading system and what better system language to apply?...please.. sent me on this Email.add [email protected]
Submitted byAnonymous (not verified)on Fri, 08/27/2010 - 06:50

For 500.00 US dollars I will give you the source code for a complete system written in Visual C#, with compiled executables. Interested?
Submitted byAnonymous (not verified)on Thu, 09/30/2010 - 10:31

hi i am a act student .. Can you help me in my case study about mini library system ... using VB 6.0 and connect it into microsoft access 2003 any reply .. tnx a lot ...
Submitted byAnonymous (not verified)on Tue, 11/09/2010 - 17:21

Hi, I am a final year csc student.Please help me out. Can anyone tell me how to connect to AIML databases using java codes. Please mail me at [email protected] Please its very urgent !
Submitted byAnonymous (not verified)on Sat, 12/04/2010 - 12:11

money converter system is our program we need acodes for an update delete and record new currency using php in xampp server..pls reply
Submitted byAnonymous (not verified)on Sat, 12/04/2010 - 12:12

money converter system is our program we need acodes for an update delete and record new currency using php in xampp server..pls reply
Submitted byAnonymous (not verified)on Mon, 12/13/2010 - 13:02

hi sir when i open my data base access password any one chance to find that iu open the password iam not change any data inthis data base

Add new comment