Ad

How To Join Another MySQL Table When Using Master/Detail Sample Form In Netbeans?

- 1 answer

I am trying to implement an application by using MySQL/JAVA and I found this tool in netbeans to easily create a new form for an existing table. (edit, insert, delete etc.) Is there an easy way to modify the code to join another table to display fields from that table.

Example: I have an employee table that has a foreign key TitleID and another table called Title that has TitleID and TitleName. I want to display TitleName instead of TitleID in the master table employee.

Ad

Answer

I do not think you will find something like that in NetBeans. However, if your DB design is simple enough (i.e. title example is real), you can try to use updatable view (more info) and use it as a table.

In complicated cases you will have to rewrite (extend?) whatever class you are using for DB access. But it is still should be possible to use whatever UI component you have been using.

Ad
source: stackoverflow.com
Ad