Home » Developer & Programmer » Forms » SQL statement to query data in a datablock (Oracle DS 10g , Win XP)
SQL statement to query data in a datablock [message #425488] Fri, 09 October 2009 05:39 Go to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Hi

Is there a way to know the value of the variables assigned in the Where Clause of the query used by Oracle Forms to fetch data to a datablock?
SELECT <column_names>
FROM <table_name>
WHERE <column1_name> = :1
AND <column2_name> = :2
AND ...

I need to know the value of :1, :2, ... during runtime

Thanks

Rajy
Re: SQL statement to query data in a datablock [message #425730 is a reply to message #425488] Mon, 12 October 2009 00:58 Go to previous messageGo to next message
omaribais
Messages: 34
Registered: October 2009
Location: Bangladesh
Member

hi Rajy,
you can use the function Get_Block_Property to get whole where clause with parameters value at run time.

- Omar
Re: SQL statement to query data in a datablock [message #426228 is a reply to message #425730] Wed, 14 October 2009 08:30 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
Omar,

Thank you for your reply.

This whole "Where Clause" get by the function GET_BLOCK_PROPERETY is the block's property used by the developer to specify explicit criteria to fetch data in a datablock;
My question was about the built-in where clause used by Oracle Forms (that may be based on a relation between datablocks) and which has the syntax above (using :1, :2, ...). These :1, :2 may be items from a master datablock. I need to know the values of these items as used by the built-in where clause and not as shown on the screen during runtime.
In other words, I need to check if the values shown on the screen are passed correctly as criterias to the where clause.

Hope I am clear in my explanation!

Rajy
Re: SQL statement to query data in a datablock [message #426232 is a reply to message #425488] Wed, 14 October 2009 08:59 Go to previous message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
If you're after this for debugging purposes then the simplist way is to trace the oracle forms session in the database and then look in the trace file.
Previous Topic: How can i insert data into table through forms.
Next Topic: Webutil WEBUTIL_FILE.FILE_OPEN_DIALOG ERROR
Goto Forum:
  


Current Time: Wed Sep 28 02:22:29 CDT 2016

Total time taken to generate the page: 0.05723 seconds