Adding one more form

  • Add one more form (Form2) to the project
  • Get connected to the Data Base and create the data set as did it with the previous Form now a new DataSetBCADataSet1 will be created
  • Here we have selected another table BCAMarks of the BCA database
To display the selected fields of a table
  • Add one more Form (Form3)
  • Insert Binding Source control
  • Now when you are creating the connection to the database here you can select the Table, the fields. Now a new DataSet is created and this will have the information of Table to be displayed and the Fields to be displayed

In the following figure you can see the two fields of the table BCAStdInfo is selected.

  • Then add the DataGridView object and follow the other procedures
Quaries
  • Now to add query, again one more form (Form4) is added, Binding Source control, Data base connectivity is created. Then DataGridView control and Datasource are added. Focus the DataGridView control which is there in the Form then Click on to Data present on the Tool bar and then click on to Add Query.

  • Then you will get the screen as shown below.

  • Now you can type your query, which is shown in the next screen. You can change the query name also. (We have changed it from FillBy to ByName.)

  • You can even go to Query Builder and create the required Query, which is shown in the next screen.

  • Click on to OK you will get the screen as shown.

  • Now run the application.
  • Then click on to the query and you will get the screen as shown.

  • Note: You can add different kinds of query and these different queries will get added to the Forms and you can select the required query at the time of running the application.


Working<< Previous

Next>>Create Database

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus




Footer1