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.

Similar Messages

  • 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,
    Leonard

    Hello,
    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.

  • Formula for Find Row action

    Hi,
    Can anyone please advice how to write the formula to for "Find Row" action in the Table tool bar? If there are 1000 entries in the table the user should be able to search for his record. Please let me know.
    Thanks in advance.
    Thanks.
    Aditya.

    Hi Aditya
    I have used the Find Row action successfully before.  In my case I had an input field (Search_Table) and a push button in a form view that triggered the Find Row action.  I set "Apply To" to the table I want to search on and the "Validation Scope" to "Element".  My table had 2 columns - KEY_EXT and TEXT.
    I then used a search formula like the one below:
    CONTAINS ( @KEY_EXT , #ID[ACA4GI]@Search_Table ) OR CONTAINS ( @TEXT , #ID[ACA4GI]@Search_Table )
    I assume you can do the same for a table toolbar button...
    When you trigger the action it will select the first hit (row) but will not automatically scroll to make the row visible which would have been good!
    Hope this helps
    Adam

  • What is the best method for finding duplicates in iPhoto?

    What is the best method for finding duplicates in iPhoto?  I would like them identified and then prompted to delete or not.

    iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ - , duplicate annahalitor, Decloner
    LN

  • Error Opening Reports (Cannot find Dimension Scenario, Error executing query: the member null doesn't exist in this application)

    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

  • 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
    Friedhold

    Here 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;

  • 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

  • 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 KB

    First, 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

  • 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

  • Methods for finding clear fm stations

    does anybody know of a way to find good, clear fm stations for your area(for use with airplay) besides scrolling through all of them?

    doesnt that stop at strong fm signals that come through with music and such?
    I thought it passed by the clear channels

  • 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 to output a row counter from sql query

    Here is an example of my problem. Say I have a table with 4 rows, my_table. Here is my select statement:
    select rownum,my_name,my_id
    from my_table
    order by my_name;
    What I need the output to be is something like this:
    1 Joe 22
    2 Carol 44
    3 Jim 21
    4 Jack 24
    What happens is that when I do the order by, the output is:
    2 Carol 44
    4 Jack 24
    3 Jim 21
    1 Joe 22
    What can I do to use the order by, but also have the counter in numerical order?

    Got two good hits on metalink:
    SELECT ROWNUM
    , t.my_name
    , t.my_id
    FROM (SELECT mt.my_name
    , mt.my_id
    FROM my_table mt
    ORDER BY mt.my_name) t
    AND ALSO THIS ONE:
    select rownum, a.*
    from
    select my_name,my_id
    from my_table
    order by my_name;
    ) a;

  • "Recovery system update required." for Find My Mac -- after already updated!

    I've run the latest round of updates on My 2011 MacBook Pro, and I have run into a snag with the new iCloud control panel.
    I want to enable the "Find My Mac" feature, but unfortunately I am not able to, as the checkbox is grayed out. There is an error beside the control saying that I need to update the recovery system as per the title of this thread. I actually already *did* do this earlier today, however, and there are no other updates.
    What is going on here? Is it possible that the update didn't actually install properly? I was away from the computer at the time it rebooted and would have installed that portion, so I can't tell, but if I look in the update history, I see "Lion Recovery Update 1.0" from today in the list.
    Is anyone else having this problem? I wonder if it's just a buggy update   Hopefully this will be fixed soon by Apple in a subsequent update, but I'm curious if there's something I can do in the meantime.

    Run Disk Utility, and Verify Disk.
    You will likely notice errors that require you to reboot to the Recovery Partition, and run Disk Utility from there, to "Repair Disk".
    After running Repair Disk, reboot to the main partition, and run Repair Permissions from Disk Utility.
    Then install the Recovery System Update again.
    I bet your problem will be solved.

Maybe you are looking for

  • Not able to activate "email us" tab on a web site that previously did work, hosting co says it is not them, and safari works fine-- help!

    Mac mini, will not open FF when i select "e mail us" on a web site tab. This site has always worked before I updated to latest FFversion. The hosting co checked the links and they are all ok. The email us function is performing with Safari. I repaire

  • Mac Pro doesn't boot from any media

    Hi, We have a Dual Xeon Mac Pro that has been running fine since 2007 the person that uses it reported that it started making loud banging noises (how loud I do not know as thats quite subjective although it was loud enough to warrant other people in

  • BPM process help

    Hi All, I have a scenario to send six independent customized idocs which has the same structure. I am planning to use one BPM for the six idocs. When I put six receive blocks, i am forced to give correlation for each. I am not sure what kind of corre

  • About FI-MM & FI-SD Integration

    Hi, Can anybody explain me about the flow between FI-MM and FI-SD. I wanted to know how it is integrated and how it ll work in real time?. You can reach me @ [email protected] Thanks & Regards Nisad

  • Current date month year in flex

    can anyone let me know how to get current system date in flex and how to compare seleted date and system date in flex thanks in advance