This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Data Consistency
Similar Threads
Problem for fetching results from 2 tables which do not have relation...
sql query
Checking for already existing data
ID attribute DTD
how to come back the previous screen