Sunday, 5 May 2019

Update Data from Database using Visual Basic 2012 and MySQL

In this Visual Guide, the students will learn how to update data in MySQL database using Visual Basic 2012.

This is the final part of the Visual Basic 2012 CRUD Implementation using MySQL database.

Please follow the steps below to arrive at the same output.

1.  Modify your form to add the following objects.
Requirements:
- Button Name: btn_update
Text: Update
Name: btn_close
Text: Close
- Textbox Name: txtcname_id
Visible: False

Adding Data to MySQL using VB 2012

In this Visual Guide, the students will learn how to add data into MySQL database using Visual Basic 2012.

1. Design your form to accept data entry.
Requirements: 
- Label         Text: Enter course name
- Textbox         Name: txtcname
- Command Button Name: btnsave
                                        Text: Add
- Form 1         Text: Demo System

2.  Double Click Add Button
Add the statement above the Public Class Form1
Imports MySql.Data.MySqlClient

Visual Basic 2012 connecting MySQL Database

In this Visual Guide, students will learn how to create a basic Windows Application integrating MySQL connection.

1. Open Visual Studio 2012.


2. Create a New Project. Templates Visual Basic then select Windows Forms Application. Framework by default is set to .Net Framework 4.5 . Type name for the Project. In this tutorial, vbnetmysql then click Ok button.

Installing MySQL Connector 6.9.8

Visual Guide on installing MySQL Connector for Database Connectivity in Visual Basic 2012.

For easy reference for students on how to install mysql-connector-6.9.8.
  1. Install the MySQL connector using administrator privileges selecting complete. Click the Next button.
  2. Select Complete then click Next