Home » Developer & Programmer » Forms » Datablock based on multiple tables join (form builder 6, windows xp)
icon5.gif  Datablock based on multiple tables join [message #387820] Fri, 20 February 2009 14:00 Go to next message
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 #387835 is a reply to message #387820] Fri, 20 February 2009 15:12 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
When the error appears, go to Help menu and select "Display Error" which will tell you why Forms is unable to execute query.

A blind shot: did you properly set "Database item" items' properties to "Yes" for all database items?
Re: Datablock based on multiple tables join [message #388642 is a reply to message #387820] Wed, 25 February 2009 14:44 Go to previous messageGo to next message
phillips_bh
Messages: 4
Registered: February 2009
Junior Member
Sorry for the delay...

I'd like thank you guys, but unexpectedly it worked. I just start over from the beginning, I don't know what I've different.

Thanks anyway.

Phillips
Re: Datablock based on multiple tables join [message #388664 is a reply to message #387820] Wed, 25 February 2009 21:36 Go to previous messageGo to next message
Kevin Meade
Messages: 2101
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 Go to previous message
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
Previous Topic: Change the Number of records Displayed
Next Topic: if Hiredate > 01-jan-09 then go_block('emp')
Goto Forum:
  


Current Time: Thu Dec 08 02:04:20 CST 2016

Total time taken to generate the page: 0.06235 seconds