Upload
joms-alancado
View
15
Download
0
Tags:
Embed Size (px)
DESCRIPTION
valerieazucena.blogspot.com
Citation preview
In this program, the database table automatically load into the listbox control and the selected value on the listbox will appear into DataGridView.
POST #1:
First: Open the Visual Studio 2012 or C# Application
Second: Then Click new Project
Third: Select Visual C# and Fourth: then select Windows Forms Application after that
click OK
Create your file
name
Datagridview1
Fifth: Create a form, drag the listBox to the form and the Datagridview from the ToolBox on the left.
ListBox1
Select or open the properties of the listbox and DataGridView,Right click and choose properties and change the name.
Sixth: Select the name of your project here, then select Add after that click Class. Select Visual C# Items then select Class
andName the class as “DBConnect.cs” after that click Add button below.
Seventh: this step is almost the to step 5 except the name of the class,Select the name of your project here, then select Add after that click Class.
Select Visual C# Items then select Class andName the class as “ClassStudents.cs” after that click Add button below.Eight: Select Reference in solution Explorer and then select Add reference
Click browse then go to C:\Program Files (x86)\MySQL\Connector NET 6.7.4\Assemblies\v4.5If v4.5 didn't work choose v2.0 or v4.0 versionAfter that, select the MySql.Data.dllAnd MySql.Data.Entity.dll and open
Ninth: Go to Desktop and Open the MySQL Workbench application if you don’t have then try to install the installer inside the folder of “Automatic load database ” Then use password: admin when the installation is near to complete, after that open the MySQL Workbench application then click or open the “Local instance” then type the password: admin after that, go to managementThen select “Data Import/Restore” the follow theInstruction below.
Select this
Click this
Then go to the folder you download including this Power point and select the “student_students.sql” file then
ok andClick button “Start Import”
Click this
Tenth: Go to DBConnect.cs and insert this code.
Insert this code
Start coding here
Continue coding
Continue coding here
Eleventh: Go to your form1 or design double click the form and insert this code.
Insert this
Start coding here
Continue coding here
Twelveth: Press the F5 to run the program. And it may look like this
Reference of the program:
Thank you For
Visiting My blog
Godbless!!