Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random File Access in VB

Status
Not open for further replies.

kashu

Programmer
Oct 11, 2002
2
0
0
US
Hi ALL!

I have the following problem:

A teacher maintains a random-access file containing the following information for each student:
Name,
Social Security number,
grades on each of two hourly exams, and
the final exam grade.

Assume the random-access file GRADES.TXT has been created with string fields of length 25 and 11 and three numeric fields, and all the names and social security numbers have been entered. The numeric
fields have been initialized with zeros.

Write a program with the five command buttons
"Display First Student",
"Record Grade(s) & Display Next Student",
"Locate Student",
"Print Grade List", and
"Done"
to allow the teacher to do the following.

(a) Enter all the grades for a specific exam.
(b) Locate and display the record for a specific student so that one or more grades may be changed.
(c) Print a list of final grades that can be posted. The list should show the last four digits of the
social security number, the grade on the final exam, and the semester average of each student. The
semester average is determined by the formula (exam1 + exam2 + 2 * finalExam) /4.

I have done almost 80% of the coding, but I am getting problem in getting and putting the record. After "Displaying the First Student", when I press the button "Record Grade(s) & Display Next Student", I am facing problem. After updating the first record, it is not displaying the second record and so on. I know that somewhere there is osme silly mistake, which I am not able to think.

Do any one has any hint/idea...How to retrieve a record from a random File, then update the same record and post in the file and then retrieve the another record and so on... Like Developer/2000.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top