How to Display data in mysql Data server using C#

Опубликовано: 15 Апрель 2026
на канале: IT Core Soft
61
0

Crud Operation for mysql C#.
Save data:    • How to save data in mysql Data server usin...  
Update Data:    • How to update data in mysql Data server us...  
Delete Data:    • How to Delete data in mysql Data server us...  
View Data:    • How to Display data in mysql Data server u...  


Download from this link:
https://github.com/hamza3344/mysql/bl...

My fiverr link: https://www.fiverr.com/hamzakhalid178
My Upwork Profile: https://www.upwork.com/freelancers/~0...

Whatsapp Number: +923338672398

contact me on [email protected] for custom software's.
Please share and like the video and subscribe the channel
If any question comment below
here is a code:

using MySql.Data.MySqlClient;

MySqlConnection conn = new MySqlConnection("datasource=localhost;port=3306;username=root;password=");
string query = "select * from mydatabase.mytable;";
MySqlCommand comm = new MySqlCommand(query, conn);
MySqlDataAdapter myadt = new MySqlDataAdapter();
myadt.SelectCommand = comm;
DataTable dt = new DataTable();
myadt.Fill(dt);
dataGridView1.DataSource = dt;