Count of updated rows

Hi there,
I would like to be able to count updated rows after submitting a page. I'm aware that #MRU_COUNT# does that in success messages, but I don't know how to (or is it even possible) assign that value to a page item, for instance.
(The number of updated rows isn't all that important, I would just like to know if there was a change made or not).
Any help is much appreciated!
Edited by: 893204 on Oct 25, 2011 2:40 PM

Hi, Chris, thank you for your reply.
I have a report on Employees (Automated Row Fetch).
Editing a row brings up a modal window where I can change employee name, address and so on. I want to be able to know was there any change made to the row when the user clicks Submit.
I hope I made things clearer this time.

Similar Messages

  • Count of updated rows after an UPDATE command

    Hi, is there any way to know how many rows have been updated after an UPDATE statement in a PL/SQL program (i know it is possible in Pro*C. Thanks.

    Hi,
    it will be stored in sql%rowcount
    after your update statement try to assign this to a variable
    Update table set ....
    v_count := sql%rowcount;
    check the value of the variable v_count
    Thanks
    Ravi

  • There was an error while updating row count for "SH".."SH".CHANNELS

    Hi All,
    Am new to OBIEE.Pls help in this regard.
    Am building the physical layer as per Repository guide.When am importing the data in to this,am getting the below error.
    *"There was an error while updating row count for "SH".."SH".CHANNELS" :"*
    channles is the table name and having 5 rows.
    but am able to see the data in the sql prompt. like SELECT * FROM SH.CHANNELS then 5 rows data would be displaying..
    pls help in this regard and where is the excat problem?
    Thanks,

    what is the error?
    Make sure that your connection pool settings are okay..
    Make sure that, you are using correct driver in case of if you are using ODBC dsn..
    Also make sure that, your oracle server is running... TNS and Oracle server services

  • Obiee oracle gateway error while updating row count

    Hi ,
    OBIEE server 11.1.1.5 ,oracle server11g installed in linux 64bit,
    while updating row count in Admin tool i am getting the following error
    [NQODBC][SQL_STATE:HY000][nQSError:10058] A general error has occured.
    [nQSError: 43113]Message returned from OBIS.
    [nQSError:43093]An error occured while processing the EXECUTE PHYSICAL statement.
    [nQSError:17003]Oracle gateway error: OCIEnvNIsCreate or OCIEnvInit failed to initialize environment.Please check your Oracle Client installation and make sure the correct version of OCI libraries are in the library path.
    i am able to check the database from sqlplus it is working fine.
    Any suggestion highly appreciated plzzz

    Make sure your connection pool is valid and able to import or execute reports.
    If everything good as above said, in Physical layer database properties-> general tab choose the database version and try it once.
    If not
    Check the doc id 1271486.1
    Or
    To resolve the issue create a softlink (ln -s) in the <OracleBI>/server/Bin folder to link to the 32-bit Oracle Client Driver file.
    The example below shows how to perform a softlink from the 64 bit directory:
    cd /u10/app/orcladmin/oracle/OracleBI/server/Bin
    ln -s $ORACLE_HOME/lib32/libclntsh.so.10.1 libclntsh.so.10.1
    If helps mark

  • Not able to update row count in Physical Layer..connection failed in OBIEE 11g

    Hi Guys,
    I am not able to do Update Row count in the Physical Layer, i am getting an error The Connection has failed. This is in OBIEE 11g Linux env.
    I have put the tnsnames.ora file in the below path:
    /*****/pkgs/linux/intel/OBIEE_DIT/MW_HOME/Oracle_BI1/network/admin/
    I do not have admin under
    /****/pkgs/linux/intel/OBIEE_DIT/MW_HOME/oracle_common/network/
    But if i put the whole TNS entry in the Data Source Name i am able to connect:
    (DESCRIPTION =(ADDRESS = (PROTOCOL= TCP) (HOST= xxx.xxx.com) (PORT= 1671))(CONNECT_DATA = (SERVICE_NAME = US1OBIEE)))
    I am not able to understand the issue..
    Thanks,
    Amit

    Looks like rpd is looking for local tns config... try to use as hostname:port/ServiceName
    This should work, just in case not working! stop doing so since it is know issue.
    If helps mark

  • How to count updated rows after an UPDATE?

    Is there a way to count updated rows after an update?
    Let's say I have an update like
    UPDATE table_a
    set field_1 = 'new_field'
    WHERE field_2 ='some_value' ;
    And now I would like to insert an info record into logging table like
    INSERT INTO logging_tbl (step, description, changed_rows) VALUES('UPDATE', 'update of table_a', ?);
    update is in sqlplus script.
    Thanks.
    Message was edited by:
    br00klynZ00

    Use SQL%ROWCOUNT.
    DECLARE
      v_num NUMBER := 0;
    BEGIN
    UPDATE table_a
    set field_1 = 'new_field'
    WHERE field_2 ='some_value' ;
    v_num := SQL%ROWCOUNT;
    INSERT INTO logging_tbl (step, description, changed_rows)
    VALUES('UPDATE', 'update of table_a', v_num);
    END;

  • Error - Update Row Count in Oracle BI Administraton Tool

    Hi Everyone,
    I am running XE on the same machine that BI Administrator is running on. I them imported the HR scheme on the Physical Layer. As I try to update row count, I am getting errors:
    NQSError : - 10058 , A general error occurred
    An error occurred while executing the Physical Statement
    Oracle Error 3114 - Not connected to oracle OCI CALL OCIstmtexecute
    SQL statement preparation failed.
    I am connecting via odbc, but as my connection pool in the physical layer, I have tried all the available type of connection pool, and it does not work. I still get the same error.
    Does anyone have any ideas?
    Thanks,

    Well, could it then be that you are using a different user to connect to through the connection pool? If so, then you have to set the connection pool to prefix the tables with the schema name. I don't have access to the admin tool at the moment to point out exactly how that is done, but at least you right-click on the connection pool, choose properties and there you check a check box that suggests prefixing tables.
    The reason here is that the connection pool connects to the database using some username, and all queries are executed as this user. This user then has to have SELECT privileges on all the tables you have imported (which the user does of course if the tables can be found in the same schema), but if some tables have been imported from other schema then the server has to prefix the tables with the correct schema name.
    Hope this helps!
    Borkur

  • Purpose of Updating Row Counts in Oracle 11g RPD

    Hello all,
    I'm relatively new to RPD development, and have a relatively simple question. I have searched through the oracle community site and did several google searches for the answer. What is the purpose of Updating Row Counts on the Physical layer of the RPD? I know how to do it for a single table and for all tables. Does it help the planner build better optimized queries?

    Hi,
    Honestly I don't think OBIEE use that info at all (or it would be mandatory).
    It's more an info for the developer, to see if the DB connection works, if the table is the good one without looking at the data itself. It can also inform you if your ETL run or not (data or no data). So for me it's really only a developer helper, nothing OBIEE uses.

  • View Data & Updating row count

    Hi,
    iam using OBIEE 11g, when iam importing data from sysbase into physical layer then in the physical layer i cant able to view data and update row count also.
    For sysbase which dataconnection we have to use i.e (ODBC 3.5, OCI 10g/11g).
    for ODBC 3.5 connection is established but we cant get data i.e (view data in Physical layer ), for OCI 11g we cant establish a connection.
    Thanks in advance.
    prakash

    Hi,
    *• Relational Database System* including Oracle Database, Oracle Exadata Database Machine, Oracle TimesTen In Memory Database, DB2, Microsoft SQL Server, Teradata, Netezza, Informix, Sybase and other ODBC compliant data sources
    *• OLAP Sources* including Oracle Essbase, Hyperion Financial Management, Oracle Database OLAP Services, Oracle RPAS, Microsoft Analysis Services Cubes, and SAP BW Infocubes.
    *• XML Data Sources* including access to other types of data servers (e.g., other non-relational servers), Microsoft Excel spreadsheets, and Web Services.
    So, we should use ODBC 3.5 as Call Interface for Sybase.
    Thanks,
    Balaa...

  • Count not updating when counting table rows (after adding one)

    following this code from this link:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/479cbc96-6ec2-4d9f-b2f8-a2b43a09111e/html-client-dynamically-count-records-in-a-collection-on-browse-screen?forum=lightswitch
    I have got my screen to count how many rows are present when the screen first loads. In my scenario I have a add button located on the bottom navigation bar. this opens up a dialog window where the user can add the relevant information. However when the
    user hits save, and is navigated back to the browse screen, the count still displays the previous value. If i was to refresh the page it updates but this is not what i am after, when i navigate back i want the value to add by one, am i missing something in
    this code?
                screen.ExpanderLines.addChangeListener("state", function() {
                        screen.countExp = screen.ExpanderLines.data.length;
    thanks for any help

    Try this:
    screen.ExpanderLines.addChangeListener("count", function () {
    screen.countExp = screen.ExpanderLines.count;
    Dave
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

  • Update row count is not working but its not throwing any error

    i m using obiee 11.1.1.6.8, where i cant do update row count in physical layer and tools---update row count...nothing was afffected
    iand i cant update rowcount option in physical layer of obieee.
    please help me

    Did u check in Physical DB whether it has data or not? If it has data,Try deleting that table from physical layer and import again.
    Thanks,

  • ExecuteBatch(): number of successfully updated rows

    Hello everybody:
    Here is a simple but often a repeated question in java forums:
    Requirement:
    1.To read a flat file that has many rows of data.
    2.Parse the data and update the database accordingly.
    3.Find the number of successfully updated rows.
    Approach:
    After reading the file and parsing its data,
    - use PreparedStatement
    - use executeBatch()
    I found this as unadvisable to use executeBatch() as its implementation is
    inherently driver specific. The executeBatch() returns an array of update counts.
    Now,can any one tell me, what is the best way to trace the number of successfully
    (and unsuccessfully) updated rows by using this count?
    Is there any other way to achieve the same by not using executeBatch()?
    Can any one share a snippet of code to achieve this specific functionality?
    [Need is to log the number of unsuccessful attempts along with their
    corresponding rows of data].
    Thanks & regards,
    Venkat Kosigi

    executeBatch submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. The int elements of the array that is returned are ordered to correspond to the commands in the batch, which are ordered according to the order in which they were added to the batch. The elements in the array returned by the method executeBatch may be one of the following:
    -- A number greater than or equal to zero indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command's execution
    -- A value of -2 indicates that the command was processed successfully but that the number of rows affected is unknown
    If one of the commands in a batch update fails to execute properly, this method throws a BatchUpdateException, and a JDBC driver may or may not continue to process the remaining commands in the batch. However, the driver's behavior must be consistent with a particular DBMS, either always continuing to process commands or never continuing to process commands.
    If the driver continues processing after a failure, the array returned by the method BatchUpdateException.getUpdateCounts will contain as many elements as there are commands in the batch, and at least one of the elements will be the following:
    -- A value of -3 indicates that the command failed to execute successfully and occurs only if a driver continues to process commands after a command fails.
    return values have been modified in the Java 2 SDK, Standard Edition, version 1.3 to accommodate the option of continuing to proccess commands in a batch update after a BatchUpdateException obejct has been thrown.
    Throws BatchUpdateException (a subclass of SQLException) if one of the commands sent to the database fails to execute properly or attempts to return a result set. The BatchUpdateException getUpdateCounts() method allows you to known the element who caused the fail identified by a -3 value.
    -- So, if you have a succesfully result, look for at the executeBatch returned array ( #values >= 0 ) + ( #values == -2 ) = successes
    and if you have not a succesfully result, catching the BatchUpdateException take the array returned by the getUpdateCounts() method, and look for the position in which array values are -3. You could take the data at this position on batch and log it.
    -- Other way to insert a bulk copy on database is to use a bcp command ( it�s not java, bcp is an independent command ) that allows you to do bulk inserts from file, indicate an error file, bcp will give to you as result a file with those lines not where inserted.
    I hope have help you.;)

  • VBA crashes on "rowNum = objXLAppln.Range("A" & Rows.Count).End(xlUp).Row"

    I have code that has the line "rowNum = objXLAppln.Range("A" & Rows.Count).End(xlUp).Row". Every once in a while the macro crashes on this line. It doesn't happen regularly or with a pattern. The entire code is below. I have several
    modules that use this line of code. Any ideas?
    Function ImportScores()
    Dim RecSet As DAO.Recordset
    Dim objXLAppln As Excel.Application
    Dim objWBook As Excel.Workbook
    Dim rowNum As Variant
    Dim i As Integer
    Dim j As Integer
    Dim StrPathFile As String, strFile As String, strPath As String
    Dim strBrowseMsg As String, strInitialDirectory As String, strFilter As String
    'show dialogue box
    strBrowseMsg = "Select the EXCEL file:"
    'set directory to load files from
    strInitialDirectory = "C:\Bridge_CIP_Part-A_B\"
    'run strFilter function
    strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.xlsx)", "*.xlsx")
    StrPathFile = ahtCommonFileOpenSave(InitialDir:=strInitialDirectory, _
    Filter:=strFilter, OpenFile:=True, _
    DialogTitle:=strBrowseMsg, _
    Flags:=ahtOFN_HIDEREADONLY)
    If StrPathFile = "" Then
    MsgBox "No file was selected.", vbOK, "No Selection"
    Exit Function
    End If
    'Set Excel application object. Critical for macro to run properly. Do not change.
    Set objXLAppln = New Excel.Application
    'Open workbook and worksheet to load data.
    With objXLAppln
    Set objWBook = .Workbooks.Open(StrPathFile)
    objXLAppln.Visible = True
    End With
    Set RecSet = CurrentDb.OpenRecordset("Performance_Scores")
    'Copy data from Excel cells to Access fields
    objXLAppln.Sheets("Performance_Attributes").Select
    rowNum = objXLAppln.Range("A" & Rows.Count).End(xlUp).Row
    objXLAppln.Range("A10").Select
    'Add records to table from Excel
    With RecSet
    For i = 0 To rowNum - 9
    RecSet.AddNew
    RecSet.Fields("CIP_ID").value = objXLAppln.ActiveCell.Offset(i, 0).value
    RecSet.Fields("5YearScore").value = objXLAppln.ActiveCell.Offset(i, 53).value
    RecSet.Fields("10YearScore").value = objXLAppln.ActiveCell.Offset(i, 54).value
    RecSet.Fields("15YearScore").value = objXLAppln.ActiveCell.Offset(i, 55).value
    RecSet.Fields("20YearScore").value = objXLAppln.ActiveCell.Offset(i, 56).value
    RecSet.Update
    Next i
    End With
    'Close everything
    RecSet.Close
    objWBook.Close SaveChanges:=False
    objXLAppln.Quit
    Set RecSet = Nothing
    Set objWBook = Nothing
    Set objXLAppln = Nothing
    End Function

    I rewrote as below.
    But rather than doing it this way, I would create a linked table to this workbook and import the data using an Append query.
    Function ImportScores()
        Const FOOTER_ROWS_TO_SKIP As Integer = 10
        Const COL_CIP_ID As Integer = 1
        Const COL_5YEARSCORE As Integer = 54
        Dim RecSet      As DAO.Recordset
        Dim objXLAppln  As Excel.Application
        Dim objWBook    As Excel.Workbook
        Dim objXLSheet  As Excel.Worksheet
        Dim rowNum      As Variant
        Dim row         As Integer
        Dim j           As Integer
        Dim StrPathFile As String, strFile As String, strPath As String
        Dim strBrowseMsg As String, strInitialDirectory As String, strFilter As String
        'show dialogue box
        strBrowseMsg = "Select the EXCEL file:"
        'set directory to load files from
        strInitialDirectory = "C:\Bridge_CIP_Part-A_B\"
        'run strFilter function
        strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.xlsx)", "*.xlsx")
        StrPathFile = ahtCommonFileOpenSave(InitialDir:=strInitialDirectory, _
                                            Filter:=strFilter, OpenFile:=True,
                                            DialogTitle:=strBrowseMsg,
                                            Flags:=ahtOFN_HIDEREADONLY)
        'StrPathFile = "C:\Users\Tom\Documents\test.xlsx"        'testonly
        If StrPathFile = "" Then
            MsgBox "No file was selected.", vbOK, "No Selection"
            Exit Function
        End If
        'Set Excel application object. Critical for macro to run properly. Do not change.
        Set objXLAppln = New Excel.Application
        'Open workbook and worksheet to load data.
        With objXLAppln
            Set objWBook = .Workbooks.Open(StrPathFile)
            objXLAppln.Visible = True
            Set objXLSheet = objXLAppln.Sheets("Performance_Scores")
        End With
        rowNum = objXLSheet.UsedRange.Rows.Count
        'Add records to table from Excel
        Set RecSet = CurrentDb.OpenRecordset("Performance_Scores", dbOpenDynaset)
        With RecSet
            For row = 1 To rowNum - FOOTER_ROWS_TO_SKIP
                RecSet.AddNew
                RecSet.Fields("CIP_ID").Value = objXLSheet.Cells(row, COL_CIP_ID).Value
                RecSet.Fields("5YearScore").Value = objXLSheet.Cells(row, COL_5YEARSCORE).Value
                'etc.
                RecSet.Update
            Next row
        End With
        'Close everything
        RecSet.Close
        objWBook.Close SaveChanges:=False
        objXLAppln.Quit
        Set RecSet = Nothing
        Set objWBook = Nothing
        Set objXLAppln = Nothing
    End Function
    -Tom. Microsoft Access MVP

  • Doubt Regarding Updated Rows

    Hello,
    After using Bulk Collect & FORALL for updating rows in a table
    How to find the total number of rows Affected (Updated) ...
    please explain by an example..??

    Hi Aijaz,
    If i'm correct you need to know the number of rows updated after the DML.
    This might help.
    -- Example Using the RETURNING Clause with a Record
    DECLARE
    TYPE setRec IS RECORD (key_name settings.settings_key%TYPE,
    value_1 settings.settings_date_value%TYPE );
    TYPE t_set_info IS TABLE OF setRec;
    set_info t_set_info := t_set_info( NULL );
    BEGIN
    UPDATE settings SET settings_date_value = SYSDATE WHERE settings_key LIKE '%DATE%'
    RETURNING settings_key, settings_date_value BULK COLLECT INTO set_info;
    DBMS_OUTPUT.PUT_LINE('Total rows ' || set_info.COUNT );
    ROLLBACK;
    END;
    /

  • Array Bind: nbr of updated rows?

    Hello,
    when using array binding with UPDATE statements, how to look up the number of updated rows?
    I couldn't find any parameter property such as ArrayBindAffectedRows.
    Is it possible to use array bind with SQL statements which return values, e.g.:
    UPDATE emp SET salary = salary + :increase
    WHERE mgr = :mgrNo
    RETURNING salary INTO :newSalary;
    Hm, arrays :increase and :newSalary might have different lengths.
    Thanks,
    Armin

    Ok this is genuinly tricky.
    The only way I can think of to get this is to use FORALL and BULK COLLECT. This does an array-bound insert from PL/SQL. But you need to pass Associative Arrays from ODP.NET to PL/SQL to get this started.
    Any other solution I could think of would require running some PL/SQL code for each update statement, for instance in a trigger. But avoiding the context switches from PL/SQL to SQL is a main reason to use array binding in the first place.
    Here's a complete sample program:
    I used inline PL/SQL for compactness, but you might want to save the block as a procedure.
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
         public class Test
          static OracleConnection connect()
            string constr = "data source=oracle;user id=scott;password=tiger";
            OracleConnection con = new OracleConnection(constr);
            con.Open();
            return con;
        const string sql = @"
    declare
      type NumTable is table of Number index by binary_integer;
      l_managers NumTable := :mgr;
      l_increase NumTable := :inc;
      l_newSals NumTable;
      l_records int;
    begin
      forall idx in l_managers.first .. l_managers.last
        update emp
        SET
        sal = sal + l_increase(idx)
        WHERE mgr = l_managers(idx)
        RETURNING sal BULK COLLECT INTO l_newSals;
      :records_affected := l_newSals.count;
    end;
        [STAThread]
        static void Main(string[] args)
          try
            using (OracleConnection con = connect())
              string cr = new String(new char[] {(char)13});
              OracleCommand cmd = new OracleCommand(sql.Replace(cr,""),con);
              OracleDecimal[] increases = new OracleDecimal[] {10,20,30};
              int[] managers = new int[] { 7698,7839,7782};
             OracleParameter pMgr = cmd.Parameters.Add("manager",
                 OracleDbType.Int32,
                 ParameterDirection.Input);
              pMgr.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
              pMgr.Size = managers.Length;
              pMgr.Value = managers;
              OracleParameter pInc = cmd.Parameters.Add("increase",
                 OracleDbType.Decimal,
                 ParameterDirection.Input);
              pInc.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
              pInc.Size = increases.Length;
              pInc.Value = increases;
              OracleParameter pRecs = cmd.Parameters.Add("records",
                 OracleDbType.Int32 ,
                 ParameterDirection.Output);
              pRecs.CollectionType = OracleCollectionType.None;
              cmd.ExecuteNonQuery();
              int recs = (int)pRecs.Value;
              Console.WriteLine("{0} records affected",recs );
          catch (Exception ex)
            Console.WriteLine(ex);
    }

Maybe you are looking for

  • How can i restore my shuffle if itunes cant even detect it????

    my ipod shuffle 4 is non responsive to any of the "r" trouble shooters (with the exception to restore because it is not detectable on itunes). ive bought new cables, checked usb, updated all windows and itunes, tried wall outlet charger, tried a diff

  • Hard drive 1 303

    hard drive 1  303      i have the recovery disc but it wont go past  where it says starting windows

  • Connecting Ellipsis Jetpack to Canon Printer

    Can anyone tell me how to get my canon pixma mg3200 printer, to connect to the ellipsis jetpack?

  • Hyperlink doesn't highlight as an option

    When I try to add a link (webpage) to my existing iWeb website homepage the hyperlink option does not highlight as an option. Both inspector and insert dropdown menus fail to allow the addition of a link of any kind. Any suggestions?

  • Project Assets Window Gone

    Hello, Recently my Project Assets window has completely disappeared, when I click on that section the tab highlights but no window appears. Here is a screenshot with the window unselected: Here is a screenshot with the window selected: As you can see