Home » Developer & Programmer » Forms » (non)database blocks issues
(non)database blocks issues [message #317214] Wed, 30 April 2008 01:03 Go to next message
suhasbr
Messages: 23
Registered: April 2008
Location: Chennai
Junior Member

Hi every one,

I have a non database block in which if i enter a value and press when validate item all the other fields in the block will be populated. Now i also have a database block with me. This block how do i execute. I can't give this block in new form instance and give execute_query. Can any one tell me how do i pass the values from NDataBlock to Datablock. Can any one please let me know how to do it.
Its urgent.

[MERGED by LF]

[Updated on: Fri, 02 May 2008 15:46] by Moderator

Report message to a moderator

Re: To pass value from Databaseblock and Nondatabase block [message #317222 is a reply to message #317214] Wed, 30 April 2008 01:21 Go to previous messageGo to next message
irfan.ocp
Messages: 29
Registered: February 2008
Location: Karachi, Pakistan
Junior Member
Hi Dear.

Well a little confusion with your query you had posted.

let me clear that what you want to do.

1. Pass tabular data from Non-Database Block to Database Block.
2. Enter data in non-database block which will retrieve data like querying records. or else you want to do.

Kindly clear us for your further help.

Best Regards,
Muhammad Irfan Bakali.
Re: To pass value from Databaseblock and Nondatabase block [message #317227 is a reply to message #317222] Wed, 30 April 2008 01:57 Go to previous messageGo to next message
suhasbr
Messages: 23
Registered: April 2008
Location: Chennai
Junior Member

Hi,

I will be querying the data in the non databse block.(For that i have written a query when validate item in the item(GP_ID).Once i enter the GP_ID value i will get all the data for that block. Now i have another database block. How do i query this block with the entered GP_ID. I need a relation sort of thing. To do this.
Re: To pass value from Databaseblock and Nondatabase block [message #317238 is a reply to message #317227] Wed, 30 April 2008 03:14 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Perhaps you could use GP_ID in the DEFAULT_WHERE database block property.
Re: To pass value from Databaseblock and Nondatabase block [message #317239 is a reply to message #317238] Wed, 30 April 2008 03:18 Go to previous messageGo to next message
suhasbr
Messages: 23
Registered: April 2008
Location: Chennai
Junior Member

I have tried using the GP_ID default where property. But it we cant set the Block level default property at item level.(i.e., at the keynextval trigger at the GP_ID field)
Re: To pass value from Databaseblock and Nondatabase block [message #317246 is a reply to message #317239] Wed, 30 April 2008 04:22 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
we cant set the Block level default property at item level (i.e., at the keynextval trigger at the GP_ID field)

We can not? Why?
icon11.gif  Re: To pass value from Databaseblock and Nondatabase block [message #317248 is a reply to message #317246] Wed, 30 April 2008 04:33 Go to previous messageGo to next message
suhasbr
Messages: 23
Registered: April 2008
Location: Chennai
Junior Member

I ahve tried doing that but it is not taking. Even i checked with the value that got passed by giveing a message statement. But i dont think we can do it. Is there any other method of doing it? Embarassed Embarassed Sad
Re: To pass value from Databaseblock and Nondatabase block [message #317265 is a reply to message #317248] Wed, 30 April 2008 05:26 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, perhaps you should post your code so that we could see what you are doing. Because, SET_BLOCK_PROPERTY isn't restricted procedure, can be set in KEY-NEXT-ITEM trigger, does its job correctly if you know how to write it.

Therefore, I'd say that it must be you who is doing something the way you shouldn't, rather than Oracle Forms being unable to do it.
Re: To pass value from Databaseblock and Nondatabase block [message #317294 is a reply to message #317265] Wed, 30 April 2008 06:55 Go to previous messageGo to next message
suhasbr
Messages: 23
Registered: April 2008
Location: Chennai
Junior Member


This query i ma using it in the NDC item of control block.

select..... into..... from..... where........
by this i am populating the data into the ctrl_block.
Then,
go_block('ims_ndc_usc');
SET_BLOCK_PROPERTY('IMS_NDC_USC',DEFAULT_WHERE,'WHERE IMS_NDC = :CTRL_BLOCK.IMS_NDC ');
execute_query;

please help me out..... Embarassed
Re: To pass value from Databaseblock and Nondatabase block [message #317304 is a reply to message #317294] Wed, 30 April 2008 07:15 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
WHERE condition you use is wrong. Try with
SET_BLOCK_PROPERTY('IMS_NDC_USC', DEFAULT_WHERE, 'WHERE IMS_NDC = ' || :CTRL_BLOCK.IMS_NDC);
(note the way I concatenated column name with item value)
icon4.gif  How to get multiple data [message #317594 is a reply to message #317214] Fri, 02 May 2008 02:22 Go to previous messageGo to next message
suhasbr
Messages: 23
Registered: April 2008
Location: Chennai
Junior Member

Hi every one,

I have a Nondatabase block and a databae block.I am quering records by entering the value in Nondatabase block. So all the values are getting populated in Nondatabase and database block.
Now for the value entered in the Nondatabase block ,if there are more than one set of records that can be possible for that value,
how to see all the records. Its not a tabular form. Embarassed Can we use Next button. But in that what are we suppose to write. We can't give next_record for nondatabase block. So is there any sollution for it??

Please let me know........ Embarassed
Re: How to get multiple data [message #317726 is a reply to message #317594] Fri, 02 May 2008 16:00 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
We can't give next_record for nondatabase block.

Whoa! Slow down a little bit, please. What makes you think so? Why couldn't you use NEXT_RECORD for a non-database block? What prevents you to do so? (For your information: yes, you CAN use it).

So, this non-database block displays only one record (in other words, we can assume that its layout is "form" instead of "tabular"). If you want to see all records, obviously, you'll have to scroll through all of them, one by one. Once the block is populated, you don't have to do anything - pressing the "down" arrow key will move to the next record. If you, however, want to code it, you could create a button and write WHEN-BUTTON-PRESSED trigger with only one statement: DOWN. You could even make it fancy by adding some more code to it (or KEY-DOWN trigger):
IF :system.last_record = 'TRUE' THEN
   message('You are on the last record');
ELSE
   down;
END IF;
Previous Topic: Difference in Developer 2000, DevSuit 6i and 10g
Next Topic: Calling a form in a trigger
Goto Forum:
  


Current Time: Sun Feb 09 22:20:52 CST 2025