Go_block doesn't wait after execute query.
Hi All,
I have an issue with go_block and execute query sequence. I have a code
snippet which is in a program unit called form key-exeqry trigger. As per
the expected behaviour the cursor should wait on the block for user input.
But it just shows the block with the details and moves to the next code
after execute-query. I added few debug messages in when-new-block-instance
and pre-query triggers for the block, but none of them get executed.
This block is being displayed through an another flow and there it waits .
Please help!!
Thanks in advance
Ashok
if l_cnt >0 then
message('condition matched');pause;
l_where := 'acct_no = 1114';
go_block('sel_acct');
clear_block(no_validate);
set_block_property('sel_acct',DEFAULT_WHERE,l_where);
execute_query;
message('after sel_acct');pause;
> As per the expected behaviour the cursor should wait on the block for user input.
You are confusing Enter_Query with Execute_Query.
If you change your Execute_Query to Enter_Query, the process will stop and allow the user to enter query values. However, your next line,
message('after sel_acct');pause;
will never execute.
But, you should NOT code the Enter_Query command in a process called by Key-Exeqry, since the user needs to press Key-Exeqry after he enters query values. Your process above should be initiated by a Key_EntQry trigger instead.
Similar Messages
-
JDBC Driver 11.2.0.1.0 freeze after execute query with order by
Hi,
I have two tables : A and B
The table B has as foreign key the ID from table A.
I'm executing statment select id, foreing_id, name from table b order by foreing_id;
After executing query I see on database that query remains inactive and I don't receive any response on my client.
I've activate the oracle driver logs and I notice that driver stop working after these lines
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_30: return: [B@126f827
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_30: Exit
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: Enter:
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: return: 178
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: Exit
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: Enter:
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: return: 2000
Dec 26, 2012 7:05:22 PM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: Exit
I'm using linux machine to execute this query, and I tried execute this same application in another linux machine and the query works.
It's very strange, for instance, this only happens if I have two records on table B using the id from table A, and also happens if only one record from table A.
Could someone help me what's going on with oracle driver?LOG ORACLE DRIVER_
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql initialize
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql computeBasicInfo
TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql computeBasicInfo
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
TRACE_30: return: 0
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlKind
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement prepareForNewResults
TRACE_16: Enter: true, true
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement clearWarnings
TRACE_16: Public Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement clearWarnings
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement prepareForNewResults
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
TRACE_20: Debug: needToPrepareDefineBuffer = true
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
CONFIG: SQL: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
TRACE_16: Enter: null
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
TRACE_16: Enter: null
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection registerHeartbeat
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLine
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLineUnchecked
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLineUnchecked
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.PhysicalConnection needLine
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection open
TRACE_16: Enter: oracle.jdbc.driver.T4CStatement@af72d8
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Enter: "T4CConnection.open"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement setCursorId
TRACE_16: Enter: 0
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement setCursorId
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection open
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement executeMaybeDescribe
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement executeMaybeDescribe
TRACE_20: Debug: rowPrefetchChanged = false, needToParse = true, needToPrepareDefineBuffer = true, columnsDefinedByUser = false
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CStatement executeForDescribe
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Enter: "oracle.jdbc.driver.T4CStatement.execute_for_describe"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
TRACE_16: Enter: null
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempClobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
TRACE_16: Enter: null
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanTempBlobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleStatement cleanOldTempLobs
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Enter: "oracle.jdbc.driver.T4CStatement.doOall8"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection assertLoggedOn
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedMessages
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedClose
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedClose
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.T4CConnection sendPiggyBackedMessages
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_16: Enter: true, false
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
TRACE_16: Enter: true, false
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql skipSpace
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql skipSpace
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql handleODBC
TRACE_16: Enter: NORMAL
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql handleODBC
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
TRACE_16: return: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql parse
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
TRACE_30: return: SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSql
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
TRACE_16: Enter: "SELECT ID, TABLE_A_ID, NAME, URL, ISACTIVE FROM TABLE_B ORDER BY TABLE_A_ID"
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
TRACE_16: return: [B@289d2e
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion StringToCharBytes
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_30: return: [B@289d2e
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.OracleSql getSqlBytes
TRACE_30: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: return: 178
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getServerCharSetId
TRACE_16: Exit
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: Enter:
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: return: 2000
Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId
TRACE_16: Exit
DDL TABLE A*
CREATE TABLE "TABLE_A"
( "ID" NUMBER NOT NULL ENABLE,
"NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"TYPE" NUMBER NOT NULL ENABLE,
"VERSION" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"ISIMPLIED" NUMBER(1,0),
CONSTRAINT "TABLE_A_PK" PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
CREATE UNIQUE INDEX "TABLE_A_NAME_UNIQ" ON "TABLE_A" ("NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
CREATE UNIQUE INDEX "TABLE_A_PK" ON "TABLE_A" ("ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
DDL Table B:_
CREATE TABLE "TABLE_B"
( "ID" NUMBER NOT NULL ENABLE,
"TABLE_A_ID" NUMBER NOT NULL ENABLE,
"NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"URL" VARCHAR2(2000 BYTE) NOT NULL ENABLE,
"ISACTIVE" NUMBER(1,0) NOT NULL ENABLE,
CONSTRAINT "TABLE_B_PK" PRIMARY KEY ("ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ENABLE,
CONSTRAINT "TABLE_A_FK" FOREIGN KEY ("TABLE_A_ID")
REFERENCES "TABLE_A" ("ID") ON DELETE CASCADE ENABLE
) SEGMENT CREATION IMMEDIATE
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
CREATE UNIQUE INDEX "TABLE_B_NAME_UNIQ" ON "TABLE_B" ("NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
CREATE UNIQUE INDEX "TABLE_B_PK" ON "TABLE_B" ("ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "APPDATA" ;
Comments*_
After line: Dec 27, 2012 11:33:38 AM oracle.jdbc.driver.DBConversion getNCharSetId TRACE_16: Exit the driver freeze.
I can see on DB that query keep INACTIVE and oracle driver doesn't throws any exception.
My Oracle version is 11.2.0.1.0 and as well as oracle driver, I also tried use the version 11.2.0.3.0 but the problem persists.
More facts:
If I remove or replace by another field the clause order by TABLE_A_ID from query the query works.
In this case, I have two recods on TABLE_B with TABLE_A_ID equals 2, if I remove one of these records the query works.
The bug happens only one specific machine where the number of routers is bigger than another machine that works with all possible scenarios.
Edited by: 978737 on Dec 27, 2012 12:11 PM -
Moving to current record after execute query
Hi all,
I have a form where i can list all db jobs which can be start or stop.
for more details, form is having columns like jobs, current db status, action(start/stop drop down)
The user will view list of jobs in the screen and he straightly goes to a record and start (submit) the job using drop down for that record.
once they start/stop the job, execute query will fire to show the current status of the job.
Now going to my requirement,after execute query, I want to go to the record (job) which user has started the job .
Currently the cursor will go to first record.
Is there any oracle 10g AS property where i can get current record , put it in parameter and go to that record after execute query?
Is there any other way?
Regards,
LeonardHello,
If you are sure the record after query will keep the same position, you can before, store the current record in a number variable with Get_Block_Property( CURRENT_RECORD) built-in, then after query use the Go_Record() with stored number variable in parameter.
If you think that after re-query the record number can change, you have to loop through your records, then stop navidation while you find the corresponding key.
Francois -
A good solution to set the actual data record after execute query ..
Hi,
in my Form there is a block on a temporary table.
The user can add query results and wishes to save the last data focus on the last actual record before the execute query to restore this focus after the query.
Is there a robust and fast solution to save the
actual data focus - execute_query - restore the saved focus ?
Thanks
FriedholdHere is a simple solution to try:
Create a package specification in your form: Package P0 is
Save_rowid varchar2(30);
Found_rec number;
End;Create a Key-Entqry trigger on your block: P0.save_rowid := :Myblock.rowid;
P0.Found_rec := null;
Enter_Query;Create a Post-Query trigger on the block: If :Myblock.rowid = P0.save_rowid then
P0.found_rec := :system.trigger_record;
End if;Create a Key-Exeqry trigger on the block: Execute_Query;
If P0.found_rec is not null then
Go_record(P0.found_rec;
End if; -
Urgent help please ! Get data after executing query
Hi all
I have stored some data's with labVIEW to mysql by writing query using db tools execute query.vi.
For fetching those data's also wrote a query(select* from....)using the same tool .
the query got executed . What tool i have to use to retrieve the data from mysql to a labview array.( the fetch recordset data.vi tool is not fetching.)
Thanks
Attachments:
db.JPG 11 KBFirst, make sure your query string is correct, no typos, the table and fields exist. If all of this is correct, try using Fetch Next Recordset instead of Fetch Recordset. I've had to do that with some databases. For some reason, the record pointer doesn't advance with the query. Or maybe the record pointer is pointing to empty space and the query places the record found as the next record instead of the current record.
- tbob
Inventor of the WORM Global -
Method for finding row count after executing query
Is there a method for finding the row count from the resultset after executing a query on a database ?
The best way: read the data from the result set. If you read it into e.g. a LinkedList, size() will tell you how many rows you got. Or you could increment a counter.
There are other ways, such as variants of ResultSet that do the read loop for you. But since you'll be doing the fetch loop anyway, those just add unnecessary work and moving parts. -
After Execute Query I cannot modify fields values.
I enter in "enter-query", put some values and I enter in "execute-query", my forms return filled with database values, but I cannot modify the fields and update records, when I try to modify, exception raises: FRM-40200.
What Can I do to solve this?
Thanks for patience.Check in your form if the property is changed at runtime.
Check for set_item_property(<item_name>,INSERT_ALLOWED,property_false);
Check for set_item_property(<item_name>,UPDATE_ALLOWED,property_false);
or
Check for set_block_property(<block_name>,INSERT_ALLOWED,property_false);
Check for set_block_property<block_name>,UPDATE_ALLOWED,property_false);
Cheers
AT -
Help: data validation before save or after execute query
Hi,
The issue that I have are:
1. A form allows user to insert and save records. When user press the save button, Instead of have an oracle error message: "FRM-40508: ORACLE error: unable to INSERT record," I'd like there be some step taken to send an alert to user if the user does not enter the date meets the fields constraint(s).
2. Same for the execute query button, when there are no records return from the query.
Thank you.
JimmyThank you all, 437901(error or informative?), Ajani, Denis and Steve. It worked out with ON-MESSAGE trigger by catching message_code.
Thanks again.
Jimmy
P.S.
In Oracle9i forms developer Reference Guide, the example is misleading:
ERROR_CODE Examples
** Built-in: ERROR_CODE,ERROR_TEXT,ERROR_TYPE
** Example: Reword certain FRM error messages by checking
** the Error_Code in an ON-ERROR trigger
** Trigger: On-Error
DECLARE
errnum NUMBER := ERROR_CODE;
errtxt VARCHAR2(80) := ERROR_TEXT;
errtyp VARCHAR2(3) := ERROR_TYPE;
BEGIN
IF errnum = 40301 THEN
Message('Your search criteria identified no matches...
Try Again.');
ELSIF errnum = 40350 THEN
Message('Your selection does not correspond to an employee.');
ELSE
4-170 -
Do you want to save changes after execute query by example
Hi, I kinda hope this is simple to solve.
I have a block with some database fields and some non-database fields.
The none database fields i populate in post-query trigger. However, if I execute the query, it seems that the form thinks that the form id 'dirty', and therefore asks if I want to save changes.
I only want this question if I manually added/changed/deleted something.
Can someone tell me what I should do? Maybe some additional code in the POST-QUERY trigger...
Here's what I've coded so far:
begin
select USERNAME
into :SEC_ACTIVITY_MEMBERSHIP.USER_DISP
from ISMS_SEC_USERS_LOV_V
where ID = :SEC_ACTIVITY_MEMBERSHIP.USER_ID;
exception
when no_data_found then
fnd_message.set_name('ISMS', 'SQL_NO_DATA_FOUND');
fnd_message.set_token('TABLE', 'SEC_ACTIVITY_MEMBERSHIP');
fnd_message.set_token('COLUMN', '(USER_ID)');
fnd_message.set_token('VALUE',
'('||to_char(:SEC_ACTIVITY_MEMBERSHIP.USER_ID)||')');
fnd_message.error;
end;
begin
select NAME
into :SEC_ACTIVITY_MEMBERSHIP.ACTIVITY_DISP
from ISMS_SEC_ACTIVITY_LOV_V
where ID = :SEC_ACTIVITY_MEMBERSHIP.ACTIVITY_ID;
exception
when no_data_found then
fnd_message.set_name('ISMS', 'SQL_NO_DATA_FOUND');
fnd_message.set_token('TABLE', 'SEC_ACTIVITY_MEMBERSHIP');
fnd_message.set_token('COLUMN', '(ACTIVITY_ID)');
fnd_message.set_token('VALUE',
'('||to_char(:SEC_ACTIVITY_MEMBERSHIP.ACTIVITY_ID)||')');
fnd_message.error;
end;Check out this thread:
status=Changed
You probably have something in the validation triggers in those fields which change database fields.
To fix it, reset the record status to Query. -
Change the color of text item after execute query
Dear friends
I would like to know how can I make a tabular form like grid and chang the color of text item when (for exp in emp table) the value of sal column between 2000$ and 4000$.
I used the SE_IEM_PROPERTY command but it change all of the text items of sal column.
please help me
thanks a lotHighlight the Existing Record in Forms
(Compatible with 4.x, 5.x, 6.x & 9i)
Step 1: Create a New Visual Attribute(BLUE_VA) (Color of highlighted record)
Font â Arial
Size â 8
Style â Plain
Font width - Normal
Font Weight - Bold
Foreground Color â Black
Background Color â Blue
Fill Pattern â Transparent
Step 2: Create another Visual Attribute (WHITE_VA) (Default Color of the record)
Font â Arial
Size â 8
Style â Plain
Font width - Normal
Font Weight - Bold
Foreground Color â Black
Background Color â White
Fill Pattern â Transparent
Step 3: Add Following code to Block-level Trigger WHEN-NEW-RECORD- INSTANCE, POST-BLOCK
(Add to the block, which has these records)
-- Following code will only highlight an item
DISPLAY_ITEM(<block_name>.<item_name>,'BLUE_VA');
-- Following code will highlight complete Record (ref: DISPLAY_ITEM example)
DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := :System.Cursor_Block;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
Display_Item( cur_itm, 'BLUE_VA');
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;
Step 4: Add Following code to Block-level Trigger PRE-RECORD, PRE-BLOCK
(Add to the block, which has these records)
-- Following code will only highlight an item
DISPLAY_ITEM(<block_name>.<item_name>,'WHITE_VA');
-- Following code will highlight complete Record (ref: DISPLAY_ITEM example)
DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := :System.Cursor_Block;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
Display_Item( cur_itm, 'WHITE_VA');
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;
I am using the above code in one of my forms and I so far haven't seen any problem -
hi all,
In my when-new-form-instance form level trigger i have given go_block('blockname')
execute_query
but this execute query is not firing .when i checked using message i was able to reach line b4 and after the execute query but still it has not populated the data from the base table.
the base table also contains records.
when i run this particular fmx in the similliar but differnt database this form runs well and data gets populated automatically.
i am unable to move fwd becouse of this i have spend many hours on this issue. please help me out.
please write for any further clarifications..
thanks and regards,There is no data on the table that satisfies the query. Copy the data from the database that does return data and try again. Are you looking at the correct table, it maybe a synonym issue as someone previously mentioned.
A trick to see the select statement is this :- Press enter_query, enter :A into one of the query fields, press enter_query. A query box should appear. Type dog=1 and click ok. You will then get an error message (FRM-40505). Choose 'Display error' of the help menu (or Shift+F1). This will display the select statement. Obviously ignore the dog=1 as this is what caused the error but look at the where clause for clues.
It does sound like the form is looking at at different table to you. -
Item color change when active in Execute Query?
I have master detial form for up to three level, I want that background color of item change when our mouse get on that item in execute query. Please if any body tried it and got success please share it with all Regards and Thanks in Advance.
Abbas.in execute querydo you mean "after execute query"?
there is a block property "Current Record Visual Attribute Group" - maybe this is what you're looking for? -
When Press "Execute Query" LOV return Item not showing
I created a LOV and defined return items.
In the form I created display items, database property NO and assign variable name which is in LOV.
When I enter a new record LOV shows the return item but when I am executing query only database record is showing and I want to show the all item even they are in database or not.
Message was edited by:
Kamranexecute query populates only database items. To populate non database items after execute query, use post query trigger.
-
When-Validate-Item and Go_Block/Execute Query dilemma
Hey there folks -- Probably not a surprise question on this forum. I did try to search for this and came up with a few posts but did not find any solutions. Hopefully, I was also doing the correct way to search on this forum. If this is a post for the nth time on this issue, I apologize.
So, I have 2 blocks:
1. Control Block that contains the STUDENT_ID field (Database Item = 'N')
2. Database block that contains the STUDENT_ID field (Database Item = 'Y' and many other fields)
My goal is do an Execute_Query if User enters the Student ID and either presses TAB or places the MOUSE in the database block and display the record if it exists. As we know, a Go_Block is not allowed in When-Validate-Item. So, I went one step further to "simulate" this. The problem is that I am still firing the Execute-Query when the record has already been retrieved. Here is what I have so far. So, the Key-Next-Item trigger works fine if User enters a Student ID and presses tab. It also works fine if User clicks on the STUDENT_BK as the When-New-Block-Instance trigger fires which in turn calls the Key-Next-Item. The problem occurs when after record has been retrieved and User clicks on control.student_id and then comes and clicks on the STUDENT_BK, the KEY-NEXT-ITEM trigger fires again.
Suggestions or pointers would be more than welcome.
Thanks!
CONTROL.student_id.Key-Next-Item
if :control.student_id is not null and :SYSTEM.BLOCK_STATUS != 'CHANGED' then
next_block;
clear_block(NO_COMMIT);
execute_query;
else
show_alert('Please enter Student ID');
end if;
STUDENT_BK.When-New-Block-Instance
go_item('control.student_id');
do_key('next_item');Yeah... I wrote before I tried it out. The GET_ITEM_PROPERTY('ITEM', previousitem) didn't work the way I thought it did. After I posted that, I tried it out and it was a complete failure.
I guess what I am thinking now, is in your STUDENT_BK block, do you only want to EXECUTE_QUERY if the :STUDENT_ID does not match the :CONTROL.STUDENT_ID? If that is true, then all you would have to do is to change your KEY-NEXT logic to include the
if STUDENT_BK.STUDENT_ID != :CONTROL.STUDENT_ID then
-- original logic
go_item('control.student_id');
do_key('next_item');
end if;The more I think about it, this should work for you. You said that you had two requirements: Entered a student id in the control block and tabbed or entered the database block. If you add the check of the student id then that should take care of your second requirement. If they enter the database block and the id's don't match then it will execute the query, else they already have the record displayed for them so you don't need to do anything.
Edited by: MLBrown on Nov 19, 2012 3:08 PM -
Hello,
two of our users get the following error message, when opening two specific reports:
First Report: Cannot find Dimension Scenario.
Second Report: Error executing query: the member null doesn't exist in this application.
Other users can access these reports, and the same users where the problem occurs can access other reports in the same folder.
I set the same rights for me, but i can access the reports without problems.
Somebody encountered the same problem before?Hi there,
I had the same issue a few weeks ago... not sure how it happened but it was related only with my username.
In order to fix it:
1. I created a report which does not require to select the scenario in advance. Try to use the default data-grid that you get when you first create a report for example.
2. When the user runs the report, try to see if he can see the dimension. Do not use the missing dimension on rows or columns. If he can see the dimension, ask him to select one scenario. This will solve the issue.
3. If he cannot see the dimension, try to change the layout of the report.
Regards,
Thanos
Maybe you are looking for
-
Are you guys Pirates or an actual company?
Dear All, I am doing my best to remain calm. I will jump right to the point. Please dont tell me to call assurion either. You sold the crap, you call Assurion. Ive been on hold long enough. Plus, I dont deal with assurion, ATT does. I did busin
-
Error in Loading Data with SQLLDR in Oracle 10G
Hello, Can any one suggest whats the problem in the below mentioned Control file used for loading data through SQL*LOADER LOAD DATA INFILE 'D:\test\temt.txt' BADFILE 'test.bad' DISCARDFILE 'test.dsc' INTO TABLE "TEST" INSERT (SRNO INTEGER(7), PROD_ID
-
Hi, I am looking for a way to remove usage rights from a pdf with the adobe reader. My scenario: I made a form to be filled out by our receptionist using acrobat pro 8.0 and live designer. She fills it out (its an order ack. form) by opening it in th
-
"set errdisable-timeout" command missing options?
I have a few 4006 switches that do not appear to have all the available errdisable commands (duplex-mismatch is not listed on most) All the 4006's are running at least Cat5.4+, one is running Cat8.4(8)GLX-k9 (output from command listed below) I could
-
Update failed - Pages brought by a different user.
Hello community! I am trying to update my Pages to version 5.5.1 released on 7 November 2014 from AppStore on my iMac purchased a few days ago. AppStores however pops up a message saying "This update is not available for this Apple ID either becaus