Alfred
|
Posted: 09/08/2004, 8:49 AM |
|
Hello everybody !
I apologize for my very simple question, but I'm quite new in Java coding.
My problem is to access a different table during the creation of a new record;
The record contains data of a student, in the record I have the key for accessing the table containing the data of his class, I need to obtain automatically the name of the class, the name of the scool to store them in the student record.
Thank you in advance
|
|
|
Anton Hinxman
|
Posted: 09/20/2004, 1:51 AM |
|
Look at CCS help text:
"Use the Before Show Event to Alter a Label's Value"
The only thing to look out for is to change the data type from the numeric to text so that it is ready for conversion in your lookup. You fire your lookup conversion in the before show event:
if(!"".equals(e.getControl().getFormattedValue())) {
e.getControl().setValue(DBTools.dLookUp("series", "series", "seriesid=" +
DBTools.toSql(e.getControl().getFormattedValue(),JDBCConnection.INTEGER,"YOURDBCONN"), "YOURDBCONN"));
}
It gets more 'interesting' when you have to tie a lookup change of the student class and then post it back to a recod which you are changing. If you get deep and dirty like this then you need Moziller www browser to examin the DOM model between to related www pages.
Regards
Anton
|
|
|
Alfred
Posts: 4
|
Posted: 09/20/2004, 8:08 AM |
|
Thank you very much for your suggestion Anton,
it's working fine !!!!
Regards
Alfredo
|
|
|
|