In this article I will share my way to Mysql CRUD using vb.net by creating custom functions. Why custom function, because this function I created itself to simplify and shorten the program to CRUD data from the database by calling the function. So we no longer need to type the insert, update and delete commands in the sql query.
Step 1: Create Function For Connect To Database
- Open Visual Basic .Net
- Create New Project
- Add New Module (Right click on Project Name at Solution Explorer - Add - Module)
- Let its name Module1.vb
- Add to Reference : MySql.Data.Dll
Type codes below to Module1:
Step 2: Next - Create Function For Insert, Update And Delete Data