473,385 Members | 1,528 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,385 software developers and data experts.

student

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


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
5:
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 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 objcmd As New OleDbCommand("INSERT into student (name, program, specialization, shift) values ( '" & TextBox2.Text & "', '" & ComboBox1.SelectedValue & "', '" & ComboBox2.SelectedValue & "', '" & ComboBox3.Text & "')", objconn)
Dim OBJDR As OleDbDataReader

objconn.Open()
objcmd.ExecuteNonQuery()
MsgBox("Record Successfully Added")
objconn.Close()




End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim Second As New display
Second.Show()

End Sub
Jul 26 '06 #1
0 1191

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

Similar topics

1
by: Mojo | last post by:
Ok, I don't want to much help but I need a push. I am supposed to write a program with 3 classes: 1. Controlling class 2. Student class 3. Grades class Controlling class instantiates a student...
16
by: Kirk Bevins | last post by:
Hello, new to posting, got a dilema in c++. I cant seem to create new instances of my student class. The idea is to make a database where the user inputs surnames and library card numbers etc. The...
6
by: laj | last post by:
HI, Excuse this new question, I am trying to impress my wife by putting a db together for her dance studio. I put a table with all students new and old with fields including name and address and...
1
by: Louis | last post by:
Hi, I am a first time poster here. I have been given an assignment to do from college and it is ot create a student gradebook. I have planned all the tables etc. to what I believe to be correct. I...
2
by: sallyk07 | last post by:
Modify the Student class so that each student object should also contain the scores for three tests. Provide a constructor that sets all instance values based on parameter values. Overload the...
4
by: Dave White | last post by:
Hello Everyone, I have created two tables to track my students' lessons. Each student is responsible for most, but not all. of the lessons. I've tried a junction table but I can't figure out...
11
by: xxbabysue123xx | last post by:
Heres the problem: Create a class Student with instance data name, studentNumber, class (where class is a String containing one of the following: “Freshman”, “Sophomore”, “Junior”, “Senior”. ...
3
by: Synapse | last post by:
hi everyone..im trying to create a student list program using linked list that will display all my info of students..but it seems theres a little prob. after i enter my first student the program will...
4
by: withu4ever | last post by:
I learned how to use struct when I try to write a program i face some misstakes which I cant correct This is the program: ------------------------------------------------------- ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.