Ad Code

Responsive Advertisement

How To Create MySQL Connection in VB.Net

In every programming language, you need to create a database connection first before working on Create, Read, Update, Delete, Search (CRUDS) applicatioin. In this tutorial, I teach you on how to create MySQL Connection in VB.Net.

Requirements:

  1. Add MySQL.data Reference to your solotion
  2. Add Imports MySql.Data.MySqlClient code above your module.


Step 1 - In your solution, add a new Module and named it with your desired database connection name. In my case I named my module as "db_conn".


Step 2 - Right-click your module and select view code.


Step 3 - Copy the code below and insert it into your db_conn module. It is recommended that you understand the database details. The server, database name, port, user id, and password.

Post a Comment

0 Comments

Close Menu