Showing posts with label Database Turorial. Show all posts
Showing posts with label Database Turorial. Show all posts

Wednesday, April 23, 2014

Visual Basic Tutorial : How to Add/Delete Record to MS Access Database Using Visual Basic 2010

6:39 AM 1
The most popular visual basic programming is about the ability of the program to save records in to the database. 

With this database you can save thousands of records at once. In visual basic programming, the common database software used in visual basic is the Sql Database and Microsoft Access.. Though the programmers of both software made an update, still the methods of adding new records to database does not effect during the update.

According to mdsn.microsoft.com the with statement is:


Executes a series of statements that repeatedly refer to a single object or structure so that the statements can use a simplified syntax when accessing members of the object or structure. When using a structure, you can only read the values of members or invoke methods, and you get an error if you try to assign values to members of a structure used in a With...End With statement. -credits to microsoft.com

In our case we are using MS Access as our database record storage together with this tutorial..

Today, we are going to use two different software to make an exciting project, these two software are Visual Basic and Microsoft Access. 

Before we begin, let us go to the basic codes of saving new records to database...

The code we are going to use is the [With... End With Statement]


This is the basic structure of the with statement..
With objectExpression

.[ statements ]

End With
Let us start a small program that will allow us to add new record on ms database file.

I have a video tutorial with the whole process from creating a new project to database creation and connecting it to visual basic and coding to make it work..

Written Tutorial.. Steps

Step 1. Make new Database in ms access... Then Save it
Step 2. Open Visual Basic... Create new Project.
Step 3. Save the project.
Step 4. Copy the Saved Database you create on step 1 and navigate on this folder..


C:\Users\YourUsername\Documents\Visual Studio 2010\Projects\[saved project on step 3]\[saved project on step 3]\bin

Step 5. Once you are in the bin folder of the program you saved before, Paste the database there.. this is important for locating the database file during the coding phase.

Step 6. Watch this tutorial on how to connect the database to visual basic.





Assuming that you already connected the database to visual basic. We are going to add the code to save button to add new record to database..

Now that all the connection is all set, watch this video on how to insert and delete record on ms access database using visual basic 2008 - 2010.




Tuesday, April 1, 2014

Lesson 2: How to Connect MS Database File to Visual Basic .Net

6:42 PM 0
Lesson 2: How to Connect MS Database File to Visual Basic .Net



This next lesson will show you how to connect your database file created on MS Access to Visual Basic .Net 

This method Requires the following installed on you PC:

  • Visual Basic 2010 or later versions
  • Microsoft .NET Framework
  • Microsoft Access


I Made a video tutorial on how you can do this method. Again Just FOLLOW my steps..

According to support.microsoft.com

The following step-by-step example describes how to create a connection to the Access database by using the Microsoft Visual Studio .NET Server Explorer. The following example also describes how to use the OleDbDataAdapter class to retrieve data from the database and to insert data into a DataSet object. This example also describes how to create new rows, how to add these rows to the table, how to modify the data in the rows, and how to remove rows from the table in the Access database. 
 For detailed information visit this article

Lesson 1: How to Make Database File Using MS Access 2010

6:12 PM 0
Lesson 1 : How to Make Database on MS Access

Before we begin creating our first database program, we need first to create a database to be use to store our records. 

According to Wikipediadatabase is an organized collection of data. The data are typically organized to model relevant aspects of reality in a way that supports processes requiring this information. For example, modeling the availability of rooms in hotels in a way that supports finding a hotel with vacancies.
From this video tutorial you will learn the basic of creating your first database file. JUST FOLLOW my steps on the video..


Note: You can put many tables you want, it will depend on the system/program you want to create, this database I made is only for information system for parents and their child. The title itself represents that the "information system" is kind of a database program.

Credits/Sources : wikipedia.org | youtube.com/faivin1409