Home » Developer & Programmer » Forms » Problem with fetching data
Problem with fetching data [message #529854] Thu, 03 November 2011 07:04 Go to next message
goparaju
Messages: 54
Registered: June 2011
Member
Hi Experts,

I am working on forms 6i. I have one data block based on table EMP.

Datablock-A: Empno, Ename, Sal

I have FIND Screen: Empno, Ename, FIND Button.

I can search the data through FIND Screen and populate data in Datablock A.

I am using below logic to search data through FIND Screen.

When-Button-Pressed(FIND Button): calling 'EXECUTE_QUERY'.

In Pre-query trigger of DatablockA:

copy(:FIND.EMPNO,'BLOCKA.EMPNO');
copy(:FIND.ENAME,'BLOCKA.ENAME');

It's working fine. But below case is failing.

Let us say, if i enter empno 10 (which is not there in database) in FIND Screen --> press FIND Button, it's showing up 'QUERY CAUSED NO RECORDS', Till this point it's working fine;. But after this, if i press CTR+F11 in block A, it's not pulling records. only this case it's not pulling records.

But if i enter something else in FIND Screen, if it returns any data, then if i press CTR+F11,it's pulling all records.

Could somebody help me why it's failing to pull records if i try to query data in first case only.

Kindly help me.


Re: Problem with fetching data [message #529859 is a reply to message #529854] Thu, 03 November 2011 07:34 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
I assume you expect it to return all records in that case.
Use get_block_property(<block_name>, last_query) to find out what exactly the form sent to the DB.
Re: Problem with fetching data [message #529885 is a reply to message #529859] Thu, 03 November 2011 09:01 Go to previous message
goparaju
Messages: 54
Registered: June 2011
Member
Hi,

Thanks for your reply. I found out the answer, If it's not returning any data(in this case, EMPNO 10), if i try to query data, actually it's holding EMPNO 10, it tried query for that EMPNO 10 only, that's why it's not retrieving. I just cleared EMPNO from FIND Screen in PRE-QUERY. It's working fine now.

Thanks.
Previous Topic: Bar code generate
Next Topic: declare message for @ is not type in email address (merged 2)
Goto Forum:
  


Current Time: Sat Sep 07 13:01:52 CDT 2024