How to Retrieve and Update the Data Using C# and MySQL Database

0
193

LoadUpateMySQLC.fig.3.asdasIn this tutorial, I will teach you how to retrieve and update the data in the database using C#.net and MySQL Database. This an advance method for updating data in the database because I’m going to add the “Edit” button in the Datagridview.

 

 

Let’s begin:

 

  • Create a database in the MySQL and name it “dbuser“.
  • Create a query for adding table in the database that you have created.
  • Open Microsoft Visual Studio 2008 and create new Windows Form Application. Do the Form as follows.

LoadUpateMySQLC.fig.1.asdas

  • Go to the Solution Explorer, click the “View Code”  to fire the code editor.

LoadUpateMySQLC.fig.2.asdas

  • Declare all the classes and variables that are needed.

Note: Add MySQL.Data.dll as your references to access mysql server library.

  • Double click the Form and do the following codes for establishing a connection between MySLQ Database and C#.net.
  • Go back to the design view, double-click the “Load” button and do the following codes for Retrieving data in the database.
  • Go back to the design view again, double-click the dataGridview and do the following codes for passing the data in the DataGridView to the TextBoxes.
  • Go back to the design view again, double-click the “Save” button and do the following codes for updating data in the database.
 

For all students who need a programmer for your thesis system or anyone who needs a source code in any programming languages. You can contact me @ :
Email – [email protected]
Mobile No. – 09305235027 – TNT

 

Download Sourcecode : LoadAndUpdateMySQL

Facebook Comments

LEAVE A REPLY

Please enter your comment!
Please enter your name here