File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Data Consistency Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Data Consistency" Watch "Data Consistency" New topic

Data Consistency

Patrick Mugabe
Ranch Hand

Joined: Jan 08, 2002
Posts: 132
I have two screens with the same field (i.e it represents a primary key in one table and a foreign key in the other).
The value entered on Screen one should be automatically set on screen 2 when the 'action' button is clicked on screen one.(NB the two screens have been linked with getAppletContext().showDocument("...") .
Further Details:
Screen one has the following fields: name, surname, StudentID, residence, year and an OK Button
Screen two has: StudentID, ProgramCode, NumOfCourses, Semester, FeesBalance and an OK Button.
On clicking OK on screen one, screen two appears but what I now want is to have the StudentID that was put on screen one to be automatically set on Student ID of screen two since these are details of the same student.
I hope I have explained my problem clearly, Sorry ranchers this was too long.
Thanks for your support.
Premkumar N

Joined: Apr 21, 2001
Posts: 22
Well .. if I understand properly...
You have the studentID in screen-1 (in some variable.)

Soln : While "instantiationg" or "before showing" screen-2 why not set that screen with thsi variable...
May be u could pass this ID as a param in constructor .. or you could say scr2.setTitle("StudentID")
Hoep this helps .. :roll:

<a href="" rel="nofollow"></a> <br />Sr.Programmer Analyst ( Bioinformatics)<br />Monsanto Entrprises
I agree. Here's the link:
subject: Data Consistency
It's not a secret anymore!