473,396 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Students-DisplayForm

(First Import files i.e.:Imports System.data.OleDb)


Private Sub Display_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

OleDbDataAdapter1.Fill(DataSet41)
DataGrid1.DataSource = DataSet41.Tables(0)

Dim objconn As New OleDbConnection("PROVIDER=MICROSOFT.JET.OLEDB.4.0; Data Source=c:\IQRA.mdb")
Dim objda_prog As New OleDbDataAdapter("select distinct program from program", objconn)
Dim objDA_majors As New OleDbDataAdapter("select distinct majors from majors", objconn)
Dim objds_prog As New DataSet
Dim objds_majors As New DataSet

objda_prog.Fill(objds_prog, "program")
objDA_majors.Fill(objds_majors, "majors")

ComboBox1.DataSource = objds_prog.Tables("program")
ComboBox1.DisplayMember = "program"
ComboBox1.ValueMember = "program"

ComboBox2.DataSource = objds_majors.Tables("majors")
ComboBox2.DisplayMember = "majors"
ComboBox2.ValueMember = "majors"

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Dim objconn As New OleDbConnection("PROVIDER=MICROSOFT.JET.OLEDB.4.0; Data Source=c:\IQRA.mdb")
Dim objda_student As New OleDbDataAdapter("select * from student where program= '" & ComboBox1.SelectedValue & " ' and specialization= '" & ComboBox2.SelectedValue & " '", objconn)
Dim objds_student As New DataSet
objda_student.Fill(objds_student)
DataGrid1.DataSource = objds_student.Tables(0)

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

Dim objconn As New OleDbConnection("PROVIDER=MICROSOFT.JET.OLEDB.4.0; Data Source=c:\IQRA.mdb")
Dim objda_student As New OleDbDataAdapter("select * from student", objconn)
Dim objds_student As New DataSet
objda_student.Fill(objds_student)
DataGrid1.DataSource = objds_student.Tables(0)

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim objconn As New OleDbConnection("PROVIDER=MICROSOFT.JET.OLEDB.4.0; Data Source=c:\IQRA.mdb")
Dim objda_student As New OleDbDataAdapter("select * from student where name like '%" & TextBox1.Text & "%'", objconn)
Dim objds_student As New DataSet
objda_student.Fill(objds_student)
DataGrid1.DataSource = objds_student.Tables(0)

End Sub
End Class
Jul 26 '06 #1
0 1049

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Will | last post by:
I have a 3 main tables, tblStudent, tblEnrolled and tblCourse. I have an unmatched query which will tell me which students are not enrolled for a specific course. I also have an unmatched query...
14
by: glitter boy | last post by:
Ok so I have this class for C. I have to write this program for my instructor, where he has already posted the softcopy and algorithm. But my question is I have to convert meters to feet and in...
10
by: Jim Bayers | last post by:
We need to stop students from clicking on the form button more than once. We have a form that students fill out with their credit card information. They click, the form sends the data in xml to...
2
by: Arnold | last post by:
For some of my secondary students studying bits and bytes, I'd like to make a form in which they can create secret codes with bytes. I'd like the form to have a memo field that can only accept 0s...
17
by: JunDa.Huang | last post by:
I am a university student, How to study program language well ?
4
by: Dave White | last post by:
Hello everyone, I would like to assign a lesson to many students as a group rather than individually. Any suggestions would be appreciated. Dave White
1
by: jonkemm | last post by:
I'm making a a system for my school to allow students to have some online space to store their school files on. It has a basic upload / create folder / download / delete bit, it also has a 'submit...
2
by: =?Utf-8?B?am9lb2ppaA==?= | last post by:
Most students do not have enough time to do their homeworks, assignments, college papers, etc alone. Also most of them, even though they know what to do with respect to their writing assignment,...
13
by: Eric IsWhoIAm | last post by:
I have four tables created so far: Courses, Instructors, Courses and Instructors (which shows the Course and Instructor Name fields, but holds their IDs since those are the keys), and Students....
1
by: roxys | last post by:
Hello, I was wondering if someone could help me a bit here. Im trying to desing an electronic university students enrollement system. The system requirements are as follows: 1.Students can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.