c# and mysql database connection and .net framework version modification problems_holy_bear’s blog
class=”markdown_views prism-atom-one-dark”> Before using MFC to develop the result, the interface was too ugly and was passed, and asked to use C# to re-develop >_<, but finally got rid of the egg pain of VC6.0 and operated Y. Let’s connect to the database first. (1) Mysql-connector-net is needed to connect to the MYSQL database with c#. This component can be downloaded by searching online. To install, just press next and install according to the default path; (2 ) After creating a Winfrom project, reference this component Right-click reference in the solution explorer -> add reference -> browse, the browse path is the path where mysql-connector-net is installed, for example, my path is: C: \Program Files (x86)\MySQL\MySQL Connector Net 6.6.4\Assemblies\v2.0 Select MySql.Data.dll, and then confirm (3) Add in the project: using MySql.Data.MySqlClient; using System.Data.SqlClient; 1 2 (4) Here is a simple page layout, using a button, a listview control, and a dataGridView control, where the name of the listview control is listview1, and the name of the dataGridView control is dataGridView1 (4) Simple design for listView to suit data presentation: Select GridLines in the properties to change to true Create a new function as follows: private void bindListCiew() { this.listView1.Columns.Add(“student”); this.listView1.Columns.Add(“ID”);…
c# and mysql database connection and .net framework version modification problems_holy_bear’s blog
class=”markdown_views prism-atom-one-dark”> Before using MFC to develop the result, the interface was too ugly and was passed, and asked to use C# to re-develop >_<, but finally got rid of the egg pain of VC6.0 and operated Y. Let’s connect to the database first. (1) Mysql-connector-net is needed to connect to the MYSQL database with c#. This component can be downloaded by searching online. To install, just press next and install according to the default path; (2 ) After creating a Winfrom project, reference this component Right-click reference in the solution explorer -> add reference -> browse, the browse path is the path where mysql-connector-net is installed, for example, my path is: C: \Program Files (x86)\MySQL\MySQL Connector Net 6.6.4\Assemblies\v2.0 Select MySql.Data.dll, and then confirm (3) Add in the project: using MySql.Data.MySqlClient; using System.Data.SqlClient; 1 2 (4) Here is a simple page layout, using a button, a listview control, and a dataGridView control, where the name of the listview control is listview1, and the name of the dataGridView control is dataGridView1 (4) Simple design for listView to suit data presentation: Select GridLines in the properties to change to true Create a new function as follows: private void bindListCiew() { this.listView1.Columns.Add(“student”); this.listView1.Columns.Add(“ID”);…
c# and mysql database connection and .net framework version modification problems_holy_bear’s blog
class=”markdown_views prism-atom-one-dark”> Before using MFC to develop the result, the interface was too ugly and was passed, and asked to use C# to re-develop >_<, but finally got rid of the egg pain of VC6.0 and operated Y. Let’s connect to the database first. (1) Mysql-connector-net is needed to connect to the MYSQL database with c#. This component can be downloaded by searching online. To install, just press next and install according to the default path; (2 ) After creating a Winfrom project, reference this component Right-click reference in the solution explorer -> add reference -> browse, the browse path is the path where mysql-connector-net is installed, for example, my path is: C: \Program Files (x86)\MySQL\MySQL Connector Net 6.6.4\Assemblies\v2.0 Select MySql.Data.dll, and then confirm (3) Add in the project: using MySql.Data.MySqlClient; using System.Data.SqlClient; 1 2 (4) Here is a simple page layout, using a button, a listview control, and a dataGridView control, where the name of the listview control is listview1, and the name of the dataGridView control is dataGridView1 (4) Simple design for listView to suit data presentation: Select GridLines in the properties to change to true Create a new function as follows: private void bindListCiew() { this.listView1.Columns.Add(“student”); this.listView1.Columns.Add(“ID”);…
c# and mysql database connection and .net framework version modification problems_holy_bear’s blog
class=”markdown_views prism-atom-one-dark”> Before using MFC to develop the result, the interface was too ugly and was passed, and asked to use C# to re-develop >_<, but finally got rid of the egg pain of VC6.0 and operated Y. Let’s connect to the database first. (1) Mysql-connector-net is needed to connect to the MYSQL database with c#. This component can be downloaded by searching online. To install, just press next and install according to the default path; (2 ) After creating a Winfrom project, reference this component Right-click reference in the solution explorer -> add reference -> browse, the browse path is the path where mysql-connector-net is installed, for example, my path is: C: \Program Files (x86)\MySQL\MySQL Connector Net 6.6.4\Assemblies\v2.0 Select MySql.Data.dll, and then confirm (3) Add in the project: using MySql.Data.MySqlClient; using System.Data.SqlClient; 1 2 (4) Here is a simple page layout, using a button, a listview control, and a dataGridView control, where the name of the listview control is listview1, and the name of the dataGridView control is dataGridView1 (4) Simple design for listView to suit data presentation: Select GridLines in the properties to change to true Create a new function as follows: private void bindListCiew() { this.listView1.Columns.Add(“student”); this.listView1.Columns.Add(“ID”);…
c# and mysql database connection and .net framework version modification problems_holy_bear’s blog
class=”markdown_views prism-atom-one-dark”> Before using MFC to develop the result, the interface was too ugly and was passed, and asked to use C# to re-develop >_<, but finally got rid of the egg pain of VC6.0 and operated Y. Let’s connect to the database first. (1) Mysql-connector-net is needed to connect to the MYSQL database with c#. This component can be downloaded by searching online. To install, just press next and install according to the default path; (2 ) After creating a Winfrom project, reference this component Right-click reference in the solution explorer -> add reference -> browse, the browse path is the path where mysql-connector-net is installed, for example, my path is: C: \Program Files (x86)\MySQL\MySQL Connector Net 6.6.4\Assemblies\v2.0 Select MySql.Data.dll, and then confirm (3) Add in the project: using MySql.Data.MySqlClient; using System.Data.SqlClient; 1 2 (4) Here is a simple page layout, using a button, a listview control, and a dataGridView control, where the name of the listview control is listview1, and the name of the dataGridView control is dataGridView1 (4) Simple design for listView to suit data presentation: Select GridLines in the properties to change to true Create a new function as follows: private void bindListCiew() { this.listView1.Columns.Add(“student”); this.listView1.Columns.Add(“ID”);…