Upload
kim-pinksky
View
213
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Tutorial
Citation preview
This program automatically loads database table to a listbox control and the selected
value in listbox will appear in DataGridView.
POST #1:
Prepared by:
Ronald D. Ayson
BSIT 3B1
Step 1. Open the Visual Studio 2010 or C# Application
Step 2. click new Project on the left side
Click
This is the form that you can design your work
Toolbox
Properties
You can edit the name,font,color etc here
You can choose an item for you work and design
Solution Explorer
Step 4.Create a form like this, find it at the tool box
You can edit the name of the listbox and
datagridview by selecting listbox or
Datagridview and select properties
dataGridView
listBox
Step 5.Select the name of your project here, then select Add after that click Class.
Right click then click add and class
Step 6: Select Class and name the class as “DBConnect.cs” after that click Add button below.
Click
Edit the name as DBConnect.csClick
Step 9:Select Class and name the class as “ClassStudents.cs” after that click Add button below.
Click
Edit the name as ClassStudents.csClick
Click browse then go to
C:\Program Files (x86)\MySQL\Connector NET 6.7.4\Assemblies\v4.5
If v4.5 didn't work choose v2.0 or v4.0 version
After that select the MySql.Data.dll
And MySql.Data.Entity.dllClick
Click
Step 12. Go to Desktop and Open the MySQL Workbench application if you don’t have then try to install the installer inside the folder of “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 management. Then select “Data Import/Restore” and follow theInstruction below.
Click this firstThen second click this
Then Click and attach the “psu.sql” here
Click start import