Datablock based on multiple tables join [message #387820] |
Fri, 20 February 2009 14:00 |
phillips_bh
Messages: 4 Registered: February 2009
|
Junior Member |
|
|
Hi there!
I'm a beginner in Oracle Forms. I'm trying to base a datablock in join.
following some steps from the Internet, I've done this:
- Set the Query_Data_Source_Type to: From Clause Query;
- In Query_Data_Source_Name, I input:
SELECT A.TRX_NUMBER,B.INVENTORY_ITEM_ID, B.QUANTITY_INVOICED
FROM RA_CUSTOMER_TRX_ALL A, RA_CUSTOMER_TRX_LINES_ALL B
WHERE A.CUSTOMER_TRX_ID = B.CUSTOMER_TRX_ID
AND A.TRX_NUMBER = '4992'
AND B.WAREHOUSE_ID = 100
- In a trigger (WHEN_NEW_BLOCK_INSTANCE)I typed: execute_query;
When I execute the form, it is showed properly, but the fields on the form are empty and shows me the error: "Unable to Perform Query"
-> I don't want to use views.
-> What am I doing wrong, can somebody help me please?!
Thanks in advance!
Phillips
|
|
|
|
|
Re: Datablock based on multiple tables join [message #388664 is a reply to message #387820] |
Wed, 25 February 2009 21:36 |
|
Kevin Meade
Messages: 2103 Registered: December 1999 Location: Connecticut USA
|
Senior Member |
|
|
It makes me a little sad that you do not want to use views, they are one of the best ways to simplify your forms applications. You will find eventually that less forms code is better forms code and views and doing things in the database are your best solutions to writing less forms code. Would you like to share your reasoning behind why you do not want to use views?
Indeed, it is not just forms for which this rule applies. Any programming work can be made easier or harder depending upon the database objects exposed to the outside world.
Do not take my comment as a negative statement on Forms. I think Forms is a great tool. When working on an Oracle database, forms/plsql can't be beat for productivity in traditional business application development, especially when you get a savy developer who knows how to work closely with a DBA staff to push certain kinds of work to the database. Too bad oracle is letting Forms die a slow and ugly death.
Good luck, Kevin
[Updated on: Wed, 25 February 2009 21:37] Report message to a moderator
|
|
|
Re: Datablock based on multiple tables join [message #389106 is a reply to message #388664] |
Fri, 27 February 2009 05:31 |
phillips_bh
Messages: 4 Registered: February 2009
|
Junior Member |
|
|
Hello Kevin, I appreciate your concern about the use of views.
But, in my case, I just wanted to practice on my company's database. In a real situation I will consider the views, as is considered the best practice.
thanks for your comment.
Phillips
|
|
|