CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Java

 Accessing record from different table in Java

Print topic Send  topic

Author Message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.