Concurrency exception because of number columns

Hi,
When fill a DataSet with Number columns that are not expressable by a double (whithin .NET), because of to much decimals behind the '.'
DataAdapter can't update this row when implementing optimistic concurrency:
UPDATE ... WHERE IDcol=idval AND ora_number_col=dotnet_double_val
Is there a way to arrange the different resolution without rounding functions in the where clause?
Thanks,
Michael

Michael,
Are you asking about this?
The ODP.NET OracleDataAdapter provides the Safe Type Mapping feature because the following Oracle datatypes can potentially lose data when converted to their closely related .NET type:
NUMBER
DATE
TimeStamp (refers to all TimeStamp objects)
INTERVAL DAY TO SECOND
Sinclair

Similar Messages

  • Updating table with column NUMBER(6,2) causing concurrency exception in .NE

    For info,
    I try to update a table with a column defined as a NUMBER(6,2). I receive a concurrency exception.
    If I resize this column as a NUMBER(8,2), every thing works well.
    Bye

    I get the same problem. Changing from anything less than number(8,2) changes the vb datatype from single to double.
    Apparently ODP.NET cannot handle the single datatype.
    /Bj�

  • In XML Output the values of Number column tags are not displayed properly

    Hi,
    Our Client have been using AR Invoice Print Program for a long time and it is heavily customized. Also they are using an old version of the RDF. So we have taken the latest version of the RDF (RAXINV.rdf) for Oracle Apps 11.5.10.2 by raising a SR and implement Client's old RAXINV.rdf into it.
    All was ok, but when we are running the program, the XML Output did not generate properly. For the Q_INVOICE query (G_ORDER_BY, G_INVOICE and G_INV_TERM group), the value of some of the scaler number columns are not appeared properly. The tags are coming correctly, but the value is appearing as '*', instead of the correct value. We have checked in the RDF Level (By putting srw.message and check in the log file) that those columns are having proper value. So there is no issue with the RDF.
    But because of the above mentioned problem, the some of the PDF output field values also is not generated correctly.
    I think that because of the lexical parameters which was implementing the Q_INVOICE query (&COMMON_QUERY) this issue is coming. Because the issue is only in the Q_INVOICE query group (G_ORDER_BY, G_INVOICE and in G_INV_TERM group) not in any other query group.
    There is no problem with the scaler character columns. The issue is only with the number columns.
    Also we have checked that if we hardcode the value of the number columns in the above mentioned lexical parameter, this problem doesn't appear.
    If we put TO_CHAR function to those number columns in the lexical parameter (COMMON_QUERY), then this issue get solved. But we can't do it because of performance issue and also Client won't approve it.
    Please help.
    With Thanks and Regards

    I don't know how to read the code you pasted or I would have checked this myself.
    Do your fields in the internal table reference dictionary objects or elementary types? If not using dictionary types, the column names will be blank by default. If you can't change your fields to be dictionary types, you can try this to change the column names:
    I made a method inside my local class to add the names:
            call method set_colname
              EXPORTING iv_tab = alv_tab
                        iv_colid = 'xxxx'  "fieldname from the table
                        iv_stxt = text-t54
                        iv_mtxt = text-t55
                        iv_ltxt = text-t55.
    METHOD set_colname .
      data:
              alv_cols type REF TO cl_salv_columns_table,
              alv_col type REF TO cl_salv_column.
      TRY .
    *... Change fieldnames
            call METHOD iv_tab->get_columns RECEIVING value = alv_cols.
            call method alv_cols->get_column EXPORTING columnname = iv_colid RECEIVING value = alv_col.
            IF iv_stxt <> ''.
              CALL METHOD alv_col->set_short_text EXPORTING value = iv_stxt.
            ENDIF.
            IF iv_mtxt <> ''.
              CALL METHOD alv_col->set_medium_text EXPORTING value = iv_mtxt.
            ENDIF.
            IF iv_ltxt <> ''.
              CALL METHOD alv_col->set_long_text EXPORTING value = iv_ltxt.
            ENDIF.
       CATCH cx_salv_not_found.
      ENDTRY.
    ENDMETHOD. "set_colname

  • Primary key violation exception in auto increment column

    Hi All,
    I am facing one issue in Multi threaded environment.
    I am getting Primary key violation exception in auto increment column. I have a table and the primary key is the auto increment column, and I have a trigger which is populating this column.
    5 threads are running and inserting the data in the table and throwing Primary key violation exception randomly.
    create table example (
    id number not null,
    name varchar2(30)
    alter table example
    add constraint PK1example primary key (id);
    create sequence example_id_seq start with 1 increment by 1;
    create or replace trigger example_insert
    before insert on example
    for each row
    begin
    select example_id_seq.nextval into :new.id from dual;
    end;
    Any idea how to handle auto increment column(trigger) in Multi threaded environment??
    Thanks,

    user13566109 wrote:
    Thanks All,
    Problem was in approach; removed the trigger and placed a seq.nextval in insert query. It has resolved the issue.I very much suspect that that was not the issue.
    The trigger would execute for each insertion and the nextval would have been unique for each insertion (that's how sequences work in oracle), so that wouldn't have been causing duplicates.
    I suspect, more likely, that you had some other code somewhere that was using another sequence or some other method of generating the keys that was also inserting into the same table, so there was a conflict in the sources of the sequences being generated.
    The way you showed you had coded above, was a perfectly normal way to assign primary keys from a sequence, and is not a problem in a multi user/threaded environment.

  • QBE Error when query by String for Number column

    Hi,
    I have a table with Number column.
    The column structure is like below:
    <af:column>
    <af:inputText>
    <f:validator .../>
    <af:converNumber ..../>
    </af:inputtext>
    </af:column>
    QBE is enabled for this column.
    It works fine when query by Number value, such as '123'. But when I query by string like 'asd', it will return an error.
    Anyone met this problem?

    Hi Arun,
    I am using Jdev 11.1.1.7.0.
    In my case,
    I have a application table, from where user can create new row inline. Some fields in the row have type Long or Number. We are also using <af:converNumber ..../> inside <af:inputText> to do format.
    I do have a query panel above the table. But we want the user can also filter the records using QBE. Other columns are working fine, except the columns with type 'Number' or 'Long'.
    I checked the incident log, below are some useful information:
    Caused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
    Caused by: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT ... FROM ... WHERE ... AND ( ( (MeaRulesEO.DEFAULT_MEA_PERIOD = :vc_temp_1 ) ) )
    It seems 'MeaRulesEO.DEFAULT_MEA_PERIOD = :vc_temp_1' causes the error. Jdev assumes every input from QBE header as number. If String is entered, Jdev will return error.
    I also checked that if the table is read-only, this problem does not exist.
    Please help on this. Thank you.

  • Oracle NUMBER column retreived as System.Double instead of System.Decimal

    We've been using the OleDb Managed Provider for some time now, and all oracle NUMBER datatypes have always come back from the db as System.Decimal.
    we recently installed a new database, and now NUMBER comes back as System.Double. The table create scripts are the same for the new db. The client is not the issue as I can point the same web server at the old db and it works fine.
    I've been unable to find any documentation on the subject.

    I have the same problem also. I'm using VC++6.0 and ADO 2.71 to perform queries with an Oracle Client 9.2.0.1. The same query on same table but on different Server version returns different results. With the production server, which is an 8.1.7.4 server, a NUMBER column returns a LONG value, while on the Test server, which is a 9.2.0.5.0 server, the same column returns a DOUBLE value. The problem is that using ADO I don't check data type/size when getting values, but I aspect a LONG value because a created the column with NUMBER specification. Could this be a different default from previous server version when creating the NUMBER column without any SCALE and PRECISION attributes?

  • Composite Studio - return row number column

    Hi, I’m trying to include a row number column in my result set in Composite Studio (SQL Scratchpad), however I’m getting various error messages such as the below.  Is there any way to add a row number?
    An internal error has occurred.
    Cause: analytical function ROW_NUMBER is not supported natively.
    com.compositesw.cdms.webapi.WebapiException: An internal error has occurred.
    Cause: analytical function ROW_NUMBER is not supported natively.
     analytical function ROW_NUMBER is not supported natively.
     at com.compositesw.cdms.webapi.PrefetchCursor$LoadPipeThread.run(PrefetchCursor.java:273)
     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:662)
    Caused by: analytical function ROW_NUMBER is not supported natively.
     at com.compositesw.server.qe.QueryResult.next(SourceFile:311)
     at com.compositesw.cdms.webapi.PrefetchCursor$LoadPipeThread.run(PrefetchCursor.java:253)
     ... 3 more
    Caused by: java.lang.IllegalArgumentException: analytical function ROW_NUMBER is not supported natively.
     at com.compositesw.server.qe.physical.util.FunctionExecutor.initialize(SourceFile:232)
     at com.compositesw.server.qe.physical.util.FunctionExecutor.next(SourceFile:379)
     at com.compositesw.server.qe.physical.operator.FunctionNode.next(SourceFile:197)
     at com.compositesw.server.qe.topology.SelectPTree.nextInternal(SourceFile:399)
     at com.compositesw.server.qe.topology.SelectPTree.next(SourceFile:378)
     at com.compositesw.server.qe.QueryResult.next(SourceFile:295)
     ... 4 more
     at com.compositesw.cdms.webapi.WebapiException_SOAPSerializer.doDeserialize(WebapiException_SOAPSerializer.java:58)
     at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:209)
     at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:172)
     at com.compositesw.cdms.webapi.service.WMetaDataSvc_dataset_fetch_Fault_SOAPSerializer.deserializeDetail(WMetaDataSvc_dataset_fetch_Fault_SOAPSerializer.java:54)
     at com.sun.xml.rpc.encoding.SOAPFaultInfoSerializer.doDeserialize(SOAPFaultInfoSerializer.java:151)
     at com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:209)
     at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:172)
     at com.compositesw.cdms.webapi.service.WMetaDataSvc_Stub._readBodyFaultElement(WMetaDataSvc_Stub.java:23530)
     at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:238)
     at com.compositesw.cdms.webapi.service.WMetaDataSvc_Stub.dataset_fetch(WMetaDataSvc_Stub.java:14247)
     at com.compositesw.cdms.webapi.WDataset$FetcherThread.run(WDataset.java:273)
    Version Information: Studio 6.2.5.00.32 (hotfix), Build ID 131217-101258-0800-72550, Server 6.2.5.00.32 (hotfix)

    Hi Tom,
    I think you intended your question for the other DV community here:  https://supportforums.cisco.com/community/12298251/cisco-data-virtualization
    Although our parser allows the syntax of these analytic functions such as ROW_NUMBER to be submitted to us from a client, our query engine is not capable of processing it locally.
    It is up to the user to ensure the resulting query plan will push the sql containing that function down to the external db (ie; oracle) to be processed there instead.  Creating the query from inside a view will provide the ability to see the resulting query plan.
    Which customer (company) are you with?  If you need further assistance, I recommend you log a support case with Cisco.
    Thank you,
    Brad

  • Optimistic Concurrency exception ALWAYS thrown when field set to "Fixed"

    Hello,
    I'm concerned that there is a bug in the ODP.net interaction with the Entity Framework for Optimistic Concurrency Checking.
    I have a sequence field called tracker_id on a table that has a before insert trigger on it, which is updated to the next logical sequence number every time the record is updated. The tracker_id attribute in the object entity has had its "Concurrency Mode" set to "Fixed".
    The problem is that irrespective of whether a record has been updated in another session or not, the optimistic concurrency exception is always thrown. Please see message below:-
    "Store update, insert, or delete statement affected an unexpected number of rows (0). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries."
    code below
    catch (OptimisticConcurrencyException ocex)
                    string message;
                    if (ocex.InnerException != null)
                        message = ocex.Message + "-" + ocex.InnerException.Message;
                    else
                        message = ocex.Message;
                    mm.ERRORCODE = "1";
                    mm.ERRORMESSAGE = "Record has been updated by another user - Full Message: " + message;
                    var poobject = ocex.StateEntries[0].Entity;
                    tasdb.Refresh(System.Data.Objects.RefreshMode.StoreWins, poobject);
                    tasdb.SaveChanges();
                }I have tried disabling the trigger on the table, but it still does the above.
    Many thanks in advance,
    Graeme
    Edited by: user4487499 on 09-May-2011 02:34

    The data for the newly created row doesn't get inserted into the database until the commit is executed, so the insert trigger isn't called.
    If you need to get the value without committing, then you should implement the trigger programmatically and drop the trigger from the database. The code below shows how you could do this.
    ViewObject insertVO = findViewObject("myView");
    Row newRow = insertVO.createRow();
    SequenceImpl seq = new SequenceImpl("MY_SEQ", insertVO.getDBTransaction());
    Long next = (Long)seq.getData();
    newRow.setAttribute("primaryAttribute", new Number(next));
    ...You will need to replace MY_SEQ and primaryAttribute with the correct values for your example, but this should acheive what you want.

  • Excise Invoice Number column in T code FAGLL03

    Hi All,
    In the standard SAP Report (T code FAGLL03) G/L Account Line Item Display,client wants Excise Invoice Number column.
    We have brought the Billing Document Number for G/L account reconcilation.
    Please help me out for the above.
    Regards,
    Hemant Patil

    Hi Alpesh,
    Thanks for your reply.
    I will try the same.
    Regards,
    Hemant Patil

  • Serial Number Column in BI Report

    Hi,
    Can we add 'Serial Number Column' in BI report?
    Regards,
    Anoop Sahu

    Thanks for your response.
    I am not sure if I was clear before. I actully want to add a new column which will give sequential number to rows - 1, 2, 3, 4.... If the user changes drill down, it should automaticlly repopulate as 1, 2, 3, 4. I do not have any infoobject called 'Serial Number' in my cube.
    Regards,
    Anoop Sahu

  • Row concurrency exception not thrown for 1 page but others

    All pages have the default of true for enableTokeValidation.
    Edit a page -> Save -> Browser Back Button -> Click on Save button
    For all but one of our pages, we will successfuly get the JboException for row concurrency is inconsistent, which is what we need/hope for.
    The one page that does not give this exception is dedicated to "create" a person. After creation, it will navigate to a list name page. If back button is used and the user then click on the "Save" button on this new person page, ADF layer acutally tries to update the person for one field for the last created person. We are expecting the row concurrency exception.
    I have check and read all the thread on back buttons. And the consistent of the entity/view object used by this one page versus the rest.
    Note: All of our pages are using "redirect" navigation.
    Thanks,
    Mel

    One important different I should mention is that
    - the new person page is using a different application module A than the rest
    - all the other maintaining page is using application module B
    Is this why? How to make it work?
    Mel

  • Dynamically set number-columns-spanned

    Hi all,
    I have a cross tab which has a dynamic number of columns. Each column has a header "Location" (which is determined by the data), but the table also has a master header "Volume" which should span all of the locations. How can I acheive this?
    I currently have:
    <xsl:attribute xdofo:ctx="block" name="number-columns-spanned">2</xsl:attribute> Volumne
    But this is obviously static.
    Many Thanks
    Andy

    Hi lmd2,
    Attached is a quick example of one way to do what you are asking. This is only a general example, and there may be a bettter implementation depending on the architecture of your application.  The link here also has information on setting the number of sockets for a specific sequence file. Hope this helps.
    Regards,
    Ebele O.
    National Instruments
    Attachments:
    ParallelModel.seq ‏455 KB

  • Db function returning three db number columns...

    Hi ,
    Is it possible a db function to return three number columns fetched from a table...??
    If for example , there is a db function such as...:
    function x
    return number
    is
    begin
    select number_col_1 , number_col_2 , number_col_3
    into var1 , var2 , var3
    from table_a
    where <a_condition>;
    return <the_three_columns_selected>;
    end;
    so as in a select statement should write:
    select a , b , x from a_table
    many thanks ,
    Simon

    Alternatively you can return a SQL collection:
    SQL> create or replace function x (empno integer)
      2     return sys.dbms_debug_vc2coll
      3  is
      4     var1   emp.job%type;
      5     var2   emp.sal%type;
      6     var3   emp.deptno%type;
      7  begin
      8     select job, sal, deptno
      9       into var1, var2, var3
    10       from emp
    11      where empno = x.empno;
    12
    13     return sys.dbms_debug_vc2coll (var1, var2, var3);
    14  end;
    15  /
    Function created.
    SQL>
    SQL> select empno, ename, x(empno) x from emp
      2   where empno in (7788,7900)
      3  /
         EMPNO ENAME      X
          7788 SCOTT      DBMS_DEBUG_VC2COLL('ANALYST', '3000', '20')
          7900 JAMES      DBMS_DEBUG_VC2COLL('CLERK', '950', '30')

  • We can't add a decimal number column with the create table forms

    In the version 4, we can't add a decimal number column with the create table forms.

    In the GUI, I found the following column (I translate from french to english): PK, Name, Data_type, lenght, not null, default, comments.
    In the lenght field, if I enter 9,3 to have a NUMBER(9,3), I have a message saying that the number must be an integer.

  • Project Serial Number column in Project Server 2013 (PWA)

    Hi All,
    Whenever any new projects are created on Project Server 2013, they are arranged automatically by Alphabetical order. So i would like to know or need support through which i can create serial number column in Project Center so that projects are aligned. as
    per numbers.
    Kindly help..

    Hi,
    It is actually 2 questions. 
    First you want to create a unique ID for projects? Here is an excellent
    blog about this subject.
    Then you want to sort projects along a number? It could be a custom number field or the unique ID above. You just have to go to the server settings, manage views and go to the "sort by" section and select your number field.
    Note that the field used to sort the project center view must be in the view to be used as a sorting criteria.
    Hope this helps,
    Guillaume Rouyre, MBA, MVP, P-Seller |

Maybe you are looking for