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.
Jimmy
Thank 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
Similar Messages
-
Help: Data validation before commit or move to next record
The form that I am working on allows data insert. It needs to have a feature to inform the end user for incomplete field(s) before commit_form or move to next record for updating. Please let me know how you would do it.
Thank you,
JimmyTo prevent cursor movement out of a field in a When-validate trigger, all you do is Raise Form_trigger_failure;However, if the field is null and the user does not enter anything while tabbing through, or just clicking in then clicking somewhere else, the When-validate-item trigger does not run. You have to specifically check if the field is null in the When-validate-record trigger.
-
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. -
How will be outbound data structure in sap xi after executing the stored pr
Hi All
can any one please tell me how will be outbound data structure in sap xi after executing the stored procedure by sender JDBC adapter?
Thanks in advance
regards
RamsHi..
My stored procedure is select and it will be OUTBOUND in PI.
is it will be same as following
<resultset>
<row>
<column-name1>column-value</ column-name1>
<column-name2></column-name2>
<column-name3>column-value</ column-name3>
<column-name4></column-name4>
</row>
<row>
<column-name1>column-value</ column-name1>
<column-name2></ column-name2>
</row>
</resultset>
Regards
Rams
Edited by: Rameshkumar Varanganti on Oct 15, 2008 12:04 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 -
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 -
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. -
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 -
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; -
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 -
Date validation before submission
I have a form that requires the user to enter a date. It is a
required
field, but now they are asking for some additional
validation. Im using
Access, DWMX and ASP.
What i need is some sort of validation that the date that is
entered into
the field is no more than 7 days from todays date....if it is
less than or
7days then it will allow them to submit the form. If they put
in a date that
is Past 7days from todays date then it will not allow them to
submit the
form...
can this be done? if so can someone point me in the right
direction on
finding out how to accomplish.I looked up the VBScript functions... and found this...
DATEADD( ) which may help me in my situation
Since im not familiar with this, can someone point me in the
right direction
on how i may be able to use this?
By the looks of the examples provided i may be able to use
this
NewDate = DateAdd("d", -7, date() ) This should return the
date 7 days ago
Is there a way to use this within the form validation to
validate a date,
before submission?
"Daniel" <[email protected]> wrote in message
news:eio78j$30l$[email protected]..
>I have a form that requires the user to enter a date. It
is a required
>field, but now they are asking for some additional
validation. Im using
>Access, DWMX and ASP.
>
> What i need is some sort of validation that the date
that is entered into
> the field is no more than 7 days from todays date....if
it is less than or
> 7days then it will allow them to submit the form. If
they put in a date
> that is Past 7days from todays date then it will not
allow them to submit
> the form...
>
> can this be done? if so can someone point me in the
right direction on
> finding out how to accomplish.
>
>
> -
Data Validation Before Upload to BPC
Hi All,
We pump in trial balance data from our SAP system to BPC with some breakdown to match dimension combination in BPC. One of the required steps is that to have a checking procedure to see whether downloaded data is balanced or not, before we upload to BPC.
Would you mind sharing with me how best to have this checking, or if you have some experience on how this validation works in your company, i would appreciate it very much if you can share it.
Thanks a lot,
LiamHi Nilanjan,
Thanks for replying.
If we use Business Rule function, then we would have to upload it to BPC first and let Business Rule run the validation.
Our objective is to make sure the figures in the flat file is correct (balance in accounting view), before we submit to BPC.
Thanks,
Liam -
How to do data validation before the submit by email
I am developing an offline interactive form. There is submit button inside, which should check all data and submit the form by email if checking passes.
My problem is that I can not cancel the submit event when the checking failed.
I use Adobe LiveCycle Designer 7.1.3284.
If I use Email Submit Button, I can do validation in presubmit event. But I can not cancel the event. Even there is error in validation, form is submitted anyway.
If I use normal button, I can do validation in Click event. But I can not submit form with code.
Is there anyone who has experience on this issue?
Best Regards,
Junin that case, you can code just one line in the change event of all fields of the form
xfa.form.form1.....button_validation.presence = "visible"
xfa.form.form1.....button_submit_by_email.presence = "hidden"
After click of validate button,
if validation is successful,
xfa.form.form1.....button_validation.presence = "hidden"
xfa.form.form1.....button_submit_by_email.presence = "visible" -
Are user events valid before the event structure executes?
If I create and register for a user event and immediately generate that event before my event structure has seen the registration refnum, is the event still guaranteed to be seen by the structure? That is, are events queued up? It works but I am wondering if I can rely on it. I am very sure that I can but I am creating some production code and want to be assured that I am not just taking advantage of a bug.
A picture is worth a thousand words.
=====================
LabVIEW 2012
Solved!
Go to Solution.Generally, Felix's explanation is correct and the queue exists from the moment the register node executes, so the answer is that you can rely on this.
You should, however, be aware that when playing with dynamic registration you can experience some unexpected side effects, as you can see, for example, in this LAVA thread - http://lavag.org/topic/13607-dynamic-event-reregistration/
Another example would be this - http://lavag.org/topic/13970-unexpected-event-structure-non-timeout-behavior/page__view__findpost__p...
Or what happens if you split the registration refnum to more than one event structure (hint - NEVER do that).
Try to take over the world!
Maybe you are looking for
-
Altavista will not display search results
altavista us will not display search results. altavista canada works fine. On us site results will display in no style page but not in basic page style. The page comes up blank. This may have been caused by delta search. I think I have rid my compute
-
Photoshop CS5 all menus grayed out
Photoshop file after working on image all the menus go grayed out. Able to save file but can not select any menus. After you save the image quit and then reopen file works fine. This has happened 5 times today. Tried the file in CS3 Photoshop and hav
-
Print a compact address book?
When i go to print my address book, i want it in a compact form, and when i go to print, and select the address, it suddenly gets wide, and it takes up a lot more paper. Is there any way to make it more compact (two columns of names & addresses) whil
-
Setting up OBIEE 11G Marketing Segmentation pointing to dual CRM apps
We like to bring into another CRM app into our OBIEE 11 single instance. Currently we already have one set up with Marketing Segmentation. We would like to bring another CRM app into this single instance of OBIEE. My question is, can we configure
-
Failed to get DHCP response on interface "Marking interface dirty"
Dears i have WLC 5508 showing the below Logs , which prevent the users from connecting to the SSIDs , also its disconnecting the associted users DHCP Socket Task: Jul 11 09:54:08.992: %SIM-3-DHCP_SERVER_NO_REPLY: sim_interface.c:1039 Failed to get DH