Problem with zeros

Hi!
I'm developing a consulting application that connects to a DB2 database in an AS/400 server. The problem is that some fields of the database have leading zeros, for example, a bank account is "00005463..." Everything goes well, but when I'm trying to show the result in a JTextField, I can't get the leading zeros. What I do is to do a PreparedStament and then I call rs = getString("(some field)"); , but the text appears as "5463...". What I'm doing wrong? I'm trying with other methods, but I can get the zeros.
Anyone knows a solution?
Thanks a lot!!

I really suspect that the field is not VARCHAR, or you are using a dodgy driver. Are u using the latest version of JTOpen?? http://www-124.ibm.com/developerworks/oss/jt400/
Here is an example of using DecimalFormat:
String unformattedNum = "23";
java.text.DecimalFormat df = new DecimalFormat("0000000000000000");
String formattedNum = df.format(Integer.parseInt(unformattedNum));
System.out.println( unformattedNum + " -> " + formattedNum );

Similar Messages

  • Problems with Zero Duration .flv files

    I've recently had to troubleshoot issues with over 1200 .flv files that have an incorrect duration of 0 (zero).  I know that the keyframe data has information on the duration in these files, but I'm wanting to access this data programatically at run time and update the player so the seekbar works as expected.  After a frustrating series of searches, I've not come up with a solution and would like to know if anyone knows how to solve this issue.
    I know it's possible, since the same file loaded into the Akamai utility shows the duration as Zero, but the seek bar has the correct time.
    Thanks,
    D

    That's why you can't convert...you are converting the supported frame rates.
    yes, EditReady is TONS better. They are always on top of the latest AVCHD formats (every camera uses a different variant of AVCHD).  It used to be that they had two apps...EditReady for QT formats and  ClipWrap2 for AVCHD...but they have now rolled all of those features into EditReady...one app for everything. They have a free demo so you can try it and see for yourself.

  • ALV problem with zeros

    Hi guys,
       I have a problem in ALV. There is character field which is company code , whenever the value is '000'or 010' it is displaying as '0' or '10'. can you please help me on this. here is the field catelog for this... it is really urgent.
    CLEAR e_fieldcat.
      ADD 1 TO w_col_pos.
      e_fieldcat-fieldname   = 'AUFNR'.
      e_fieldcat-seltext_m   = 'Company Code'.
      e_fieldcat-col_pos     = w_col_pos.
      e_fieldcat-no_zero = space.
      e_fieldcat-lzero = 'X'.
      e_fieldcat-edit_mask = '==ALPHA'.
      APPEND e_fieldcat TO t_fieldcat.
    thanks.

    Hi Lakshmi ,
    wa_fieldcat-edit_mask = '==ALPHA'.
    wa_fieldcat-edit_lzero = 'X'.
    If this doesnt work.
    <b>
    Declare the field as type MARA-MATNR.
    </b>
    BCOZ conv routine for MATNR IS MATN1.
    Usually, if all is well, this will be handled automatically, for example, if on a dynpro, all you need to do is set the conversion routine value to ALPHA, then the conversion will be automatic, nothing to code. If in a list display, the field should be TYPE MARA-MATNR, then the conversion will be automatic on the list display, as well as the ALV grid.
    Reward points if helpful
    Regards
    Naresh

  • Replace: problem with zeros

    Hi to everybody
    I have tihs values
    31.800
      0.300
      2.100
    I should to get this
    31,800
    00,300
    02,100
    I use REPLACE ALL OCCURRENCES OF '.' IN lt_itob-id1 WITH ','  it is ok
    but I get an error if I use REPLACE ALL OCCURRENCES OF space IN lt_itob-id1  WITH '0' .
    Could you help me?
    Thanks a loto

    Hi,
    To Replace space with '0' use OVERLAY statement.
    DATA: l_val TYPE char6 VALUE '0.300'.
    REPLACE ALL OCCURRENCES OF '.' IN l_val WITH ',' .
    SHIFT l_val RIGHT DELETING TRAILING space.
    OVERLAY l_val WITH '000000'.
    WRITE l_val.
    Regards,
    Farheen

  • Problem with Export User's data from database oracle 11g

    i want export all user data and Its tables from oracle 11g database, I am using the comand exp, pero export only the tables with data, i Have Some tables and Not Without export data These tables,
    can someone help me!

    problem with zero extent table
    exp is de-supported in 11g. Use expdp instead to export tables without any rows.
    Srini

  • Stacked 100% bar chart - Problem with datatips for zero value data points

    I have a stacked 100% bar chart that shows datatips in Flex 4.   However, I don't want it to show datatips for
    data points with zero values.   Flex 4 shows the datatip for a zero value data point on the left side of a bar if the data point is not the first in the series.
    Here's the code that illustrates this problem.    Of particular concern is the July bar.    Because of the zero value data point problem, it's not possible to see the datatip for "aaa".
    Any ideas on how we can hide/remove the datatips for zero value data points ?        Thanks.
    <?xml version="1.0"?>
    <s:Application
    xmlns:fx="
    http://ns.adobe.com/mxml/2009"xmlns:mx="
    library://ns.adobe.com/flex/mx"xmlns:s="
    library://ns.adobe.com/flex/spark"creationComplete="initApp()"
    height="
    1050" width="600">
    <s:layout>
    <s:VerticalLayout/>
    </s:layout>
    <fx:Script><![CDATA[ 
    import mx.collections.ArrayCollection;[
    Bindable] 
    private var yearlyData:ArrayCollection = new ArrayCollection([{month:
    "Aug", a:1, b:10, c:1, d:10, e:0},{month:
    "July", a:1, b:10, c:10, d:10, e:0},{month:
    "June", a:10, b:10, c:10, d:10, e:0},{month:
    "May", a:10, b:10, c:10, d:0, e:10},{month:
    "April", a:10, b:10, c:0, d:10, e:10},{month:
    "March", a:10, b:0, c:10, d:10, e:10},{month:
    "February", a:0, b:10, c:10, d:10, e:10},{month:
    "January", a:10, b:10, c:10, d:10, e:10}]);
    private function initApp():void {}
    ]]>
    </fx:Script>
    <s:Panel title="Stacked Bar Chart - Problems with DataTips for Zero Value Items" id="panel1">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <mx:BarChart id="myChart" type="stacked"dataProvider="
    {yearlyData}" showDataTips="true">
    <mx:verticalAxis>
     <mx:CategoryAxis categoryField="month"/>
     </mx:verticalAxis>
     <mx:series>
     <mx:BarSeries
    xField="a"displayName="
    aaa"/>
     <mx:BarSeries
    xField="b"displayName="
    bbb"/>
     <mx:BarSeries
    xField="c"displayName="
    ccc"/>
     <mx:BarSeries
    xField="d"displayName="
    ddd"/>
     <mx:BarSeries
    xField="e"displayName="
    eee"/>
     </mx:series>
     </mx:BarChart>
     <mx:Legend dataProvider="{myChart}"/>
     </s:Panel>
     <s:RichText width="700">
     <s:br></s:br>
     <s:p fontWeight="bold">The problem:</s:p>
     <s:p>Datatips for zero value data points appear on left side of bar (if data point is not the first point in series).</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">For example:</s:p>
     <s:p>1) For "June", eee = 0, mouse over the left side of the bar to see a datatip for "eee". Not good.</s:p>
     <s:br></s:br>
     <s:p>2) For "July", eee = 0 and aaa = 1, can't see the datatip for "aaa", instead "eee" shows. Real bad.</s:p>
     <s:br></s:br>
     <s:p>3) For "Feb", aaa = 0, datatip for "aaa" (first point) does not show. This is good.</s:p>
     <s:br></s:br>
     <s:p>4) For "Mar", bbb = 0, datatip for "bbb" shows on the left side of the bar. Not good.</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">Challenge:</s:p>
     <s:p>How can we hide/remove datatips for zero value data points?</s:p>
     <s:br></s:br>
     </s:RichText></s:Application>

    FYI.
    Still have the issue after upgrading to the latest Flex Builder 4.0.1 with SDK 4.1.0 build 16076.   
    Posted this as a bug in the Adobe Flex Bug and Issue Management system.     JIRA
    http://bugs.adobe.com/jira/browse/FLEXDMV-2478
    Which is a clone of a similar issue with Flex 3 ...
    http://bugs.adobe.com/jira/browse/FLEXDMV-1984

  • Problem with Pole zero analysis using multisim

    Problem with Pole zero analysis using multisim
    When I tried to find input impedance function's pole zero of a parallel LC network using Multisim
    pole zero analysis, I get following message
    | | doAnalyses: matrix is singular
    | |
    | |
    | | pz simulation(s) aborted "
    The circuit as well as log file attached.
    How to correctly perform pole zero analysis?
    Solved!
    Go to Solution.
    Attachments:
    Parallel LC.JPG ‏8 KB
    parallel LC.txt ‏7 KB

    dear sir,
    thanks for your earlier reply to my question on pole zero analysis
    one more problem on pole zero analysis ;
    i tried to do pole zero analysis for circuit(shown in attached file where C1=1/6F(167mF) C2=5/18F(278mF) for which
    z(s)= (s^2+9)(s^2+1)
               s(s^2+4)
    for which zeros are at  +/-3j ,+/-1j
                  poles at       0 ,+/-2j          as per theory:
    But multisim gives different values (shown in attached file)
    what is the problem?
    please clarify.
    thanks & regards
    sagar vanarase
    Attachments:
    1portLC.JPG ‏219 KB

  • Gtx860m 2gb serious Problem with gtaV fifa15 MGS ground zero

    Hi people,
    i have a serious problem with my vga (gtx86m)
    when i wanna play with gtav,fifa 15 or mgs ground zero and i start msi after burner i notice that my vga usage is 0%.why?
    i have the last nvidia drivers installed on my notebook(350.12)
    anyone have the same problem?
    do u have some solution?
    i have a msi ge60 apache pro
    i7mobile
    gtx860m 2GB
    8gb ram
    ssd samsung 120GB
    thanks anyway
    [ ERROR: SPECIFIED ATTACHMENT MISSING ]

    Reminder:
    Forum Rules: Don’t… - Bump posts. (Bumps will be deleted without further notice)
    There are many people having the same problem (according to the ROCKSTAR forum), so I think the problem is from the GTA V and the NV Graphics Driver.
    There are users sharing the temporary fix:
    Quote:"There is a temporary fix for the Nvidia cards where you disable the Nvidia cards in the device manager and reenable after launching game."
    Source: https://support.rockstargames.com/hc/communities/public/questions/203308668-GTA-V-on-Laptop-Issues-Intel-AMD
    Give it a try.
    I'm sure that the long term solution should be a game patch or the new NV driver. It's better that you report the issue to the ROCKSTAR GAMES.

  • Since updating to LR5.5 it crashes about every 5-10 images while working in the development module. Computer is PC Windows 7 Home Premium. I have been using this computer for several years with zero problems. Is this related to the updating? What is the f

    Since updating to LR5.5 it crashes about every 5-10 images while working in the development module. Computer is PC Windows 7 Home Premium. I have been using this computer for several years with zero problems. Is this related to the updating? What is the fix?

    Do you get an error message? If so, what does it say?
    Do you get a Blue Screen?
    Does something else happen?

  • Problem with preceding zeros

    Hi i have a problem with table entries. I have one table with name 'z*' having fields of vbeln ,date, plant.
    when i try to display the records it displays all the vbeln records. In that some of them are having vbeln with preceding
    zeros like 0009050750 and some are not having zeros like 9081059. When i try to display 0009050750 it executes and display
    that record but when i try to display 9081059 it doesnot execute and it displays "no table entries found for specific key".
    Plz give any suggesions on that.
    Plz solve my issue
    Shiva.

    TABLES : vbrk.
    TYPES : BEGIN OF it_t1,
            vbeln TYPE vbrk-vbeln,
            fkart TYPE vbrk-fkart,
            fktyp TYPE vbrk-fktyp,
            vbtyp TYPE vbrk-vbtyp,
            waerk TYPE vbrk-waerk,
            END OF it_t1.
    DATA : it_tab TYPE TABLE OF it_t1,
           wa_tab TYPE it_t1.
    SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln OBLIGATORY.
    SELECT vbeln
           fkart
           fktyp
           vbtyp
           waerk FROM vbrk INTO CORRESPONDING FIELDS OF TABLE it_tab WHERE vbeln IN s_vbeln.
    LOOP at it_tab INTO wa_tab.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = wa_tab-vbeln
    IMPORTING
       OUTPUT         = wa_tab-vbeln
    MODIFY it_tab FROM wa_tab INDEX sy-tabix.
    CLEAR : wa_tab.
    ENDLOOP.
    LOOP AT it_tab INTO wa_tab.
      WRITE : / wa_tab-vbeln , wa_tab-fkart , wa_tab-fktyp , wa_tab-vbtyp , wa_tab-waerk.
      CLEAR : wa_tab.
    ENDLOOP.

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • Problem with video, My upload video is zero when I initiate ???

    I recently upgraded my cable to 8megs download, 1 full meg upload.
    Now in some two way and most three way video chats my upload starts as
    zero or goes to zero shortly.
    When it does work intermittently, it is very high. Connection doctor shows up and downloads as high as 900 framerate 20.
    I have roadrunner time warner cable, no router, no firewalls, QT streaming set at 1.5 as Ralph and other say, NONE as limite in ichat. I have tried altering the AIM port from 5190 to 443 no help.
    Could it be a bad modem? Is there a problem with ichat being able to match the higher upload and download I have now with the premium service/ Prior to this I had no problem with two way ichats. I only went to premium service because the prior service was just not quite enough to initiate three way videos, the upload was only 340 at best.
    Thanks everyone,
    Evan
    My computer is imac intel core duo, 2.16 2 gb memory

    Hi Evanshaw,
    Ok on the Uninstall.
    I would Repair Permissions and run the Cron scripts at this point just to get it as Clean a system as it can be.
    See here for Why and Links.
    1) The Instant On setting seems to make no difference.
    Changing the Streaming setting to match your download or to 1.5Mbps is the real key of the Quicktime adjustment.
    2) Newer modems seem to offer forwarding not only ports but list the Protocols as well.
    Now in earlier devices it was impossible to forward the same port to two computers (IP addresses) on most of them.
    As port 5190 needs to be forwarded for TCP and UDP it as if the modem thinks it is being forwarded twice.
    For this reason we suggest that as a test at least that the Login port is dropped to port 443. This does two things:
    a) drops it below the 1024 threshold and avoids NAT being done on it.
    b) Leaves just 5190 on UDP to be forwarded in the Modem.
    Just changing the port in iChat seems to do it, as then no data is on the 5190 TCP port.
    3) As for the lower spec machine.
    The lowest spec Mac can be a G3/600 with at least 100kbps up and down to Video chat.
    A G4/1Ghz single processor is in fact at the lowest point of Multichats IF the connection is at least 384Kbps both up and down. (I used to have 1Mb down and only 256K up and Host multichats [on a Dual 1Ghz G4) so there is a sort of tolerance in these figures).
    iChat works out a compromise that works in most cases so I would not worry too much.
    4) Yes it is fair to say that pushing the envelope on the Specs does have an Effect.
    My G4/Dual 1Ghz is fast enough and my previous internet speeds had a too low Uplink but did allow me to multichat. (there seems to be some sort of balancing out/averaging going on). However adding a second and a third Buddy to make a Four way did cause some blurriness of the pictures.
    Also If I was invited to a Chat as a non host My slowness could effect the chat as well but to a lesser extent.
    Get the fastest Computer with the best internet connection to Host.
    5) With new modems it is sometimes difficult to judge whether they are good or not.
    Sometimes they come loaded with "extra" features that can impact on something like iChat.
    For Instance:
    a) Denial of Service Attack protection (DoS) This is supposed to stop your computer being swamped with requests if you were running a web page server. It judges if too much data is coming to your machine and closes the connection if it thinks this is happening. Sometimes this is too restrictive for Video Chats at the Quality that iChat can produce. As to whether a particular device can alter this in a setting tends to vary. (my Netgear is an On or Off setting)
    b) SPI (Stateful Packet Inspection) is Similar but devices that have this can normally adjust it.
    c) QoS (Quality of Service) is similar again but more restrictive than SPI and more like DoS
    d) As I have mentioned Protocols on Port Forwarding.
    e) There is a setting on most devices called the MTU. It is about packet size. The default is always 1500 and changing it to 1492 can help.
    f) The way the device may do NAT (Network Address Translation) may not be liked by the device at the other end. It has about 6 main popular ways this is done by Manufacturers and can be a problem. (Hence the push towards UPnP if you have it as UPnP does not use NAT).
    5:42 PM Sunday; December 24, 2006

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Java API, problem with secondary keys using multi key creator

    Hi,
    I'm developing an application that inserts a few 100k or so records into a Queue DB, then access them using one of four Hash SecondaryDatabases. Three of these secondary dbs use a SecondaryMultiKeyCreator to generate the keys, and one uses a SecondaryKeyCreator. As a test, I'm trying to iterate through each secondary key. When trying to iterate through the keys of any of the secondary databases that use a SecondaryMultiKeyCreator, I have problems. I'm attempting to iterate through the keys by:
    1: creating a StoredMap of the SecondaryDatabase
    2: getting a StoredKeySet from said map
    3: getting a StoredIterator on said StoredKeySet
    4: iterate
    The first call to StoredIterator.next() fails at my key binding (TupleBinding) because it is only receiving 2 bytes of data for the key, when it should be getting more, so an Exception is thrown. I suspected a problem with my SecondaryMultiKeyCreator, so I added some debug code to check the size of the DatabaseEntries it creates immediately before adding them to the results key Set. It checks out right. I also checked my key binding like so:
    1: use binding to convert the key object to a DatabaseEntry
    2: use binding to convert the created DatabaseEntry back to a key object
    3: check to see if the old object contains the same data as the new one
    Everything checked out ok.
    What it boils down to is this: my key creator is adding DatabaseEntries of the correct size to the results set, but when the keys are being read back later on, my key binding is only receiving 2 bytes of data. For the one SecondaryDatabase that doesn't use a SecondaryMultiKeyCreator, but just a SecondaryKeyCreator, there are no issues and I am able to iterate through its secondary keys as expected.
    EDIT: New discovery: if I only add ONE DatabaseEntry to the results set in my SecondaryMultiKeyCreator, I am able to iterate through the keys as I would like to.
    Any ideas or suggestions?
    Thank you for your attention,
    -Justin
    Message was edited by:
    Steamroller

    Hi Justin,
    Sorry about the delayed response here. I have created a patch that resolves the problem.
    If you apply the patch to your 4.6.21 source tree, and then rebuild Berkeley DB, the improper behavior should be resolved.
    Regards,
    Alex
    diff -rc db/db_am.c db/db_am.c
    *** db/db_am.c     Thu Jun 14 04:21:30 2007
    --- db/db_am.c     Fri Jun 13 11:20:28 2008
    *** 331,338 ****
           F_SET(dbc, DBC_TRANSIENT);
    !      switch (flags) {
    !      case DB_APPEND:
                 * If there is an append callback, the value stored in
                 * data->data may be replaced and then freed.  To avoid
    --- 331,337 ----
           F_SET(dbc, DBC_TRANSIENT);
    !       if (flags == DB_APPEND && LIST_FIRST(&dbp->s_secondaries) == NULL) {
                 * If there is an append callback, the value stored in
                 * data->data may be replaced and then freed.  To avoid
    *** 367,388 ****
    -            * Secondary indices:  since we've returned zero from an append
    -            * function, we've just put a record, and done so outside
    -            * __dbc_put.  We know we're not a secondary-- the interface
    -            * prevents puts on them--but we may be a primary.  If so,
    -            * update our secondary indices appropriately.
    -            * If the application is managing this key's data, we need a
    -            * copy of it here.  It will be freed in __db_put_pp.
    -           DB_ASSERT(dbenv, !F_ISSET(dbp, DB_AM_SECONDARY));
    -           if (LIST_FIRST(&dbp->s_secondaries) != NULL &&
    -               (ret = __dbt_usercopy(dbenv, key)) == 0)
    -                ret = __db_append_primary(dbc, key, &tdata);
                 * The append callback, if one exists, may have allocated
                 * a new tdata.data buffer.  If so, free it.
    --- 366,371 ----
    *** 390,401 ****
                /* No need for a cursor put;  we're done. */
                goto done;
    !      default:
    !           /* Fall through to normal cursor put. */
    !           break;
    !      if (ret == 0)
                ret = __dbc_put(dbc,
                    key, data, flags == 0 ? DB_KEYLAST : flags);
    --- 373,379 ----
                /* No need for a cursor put;  we're done. */
                goto done;
    !      } else
                ret = __dbc_put(dbc,
                    key, data, flags == 0 ? DB_KEYLAST : flags);
    diff -rc db/db_cam.c db/db_cam.c
    *** db/db_cam.c     Tue Jun  5 21:46:24 2007
    --- db/db_cam.c     Thu Jun 12 16:41:29 2008
    *** 899,905 ****
           DB_ENV *dbenv;
           DB dbp, sdbp;
           DBC dbc_n, oldopd, opd, sdbc, *pdbc;
    !      DBT olddata, oldpkey, newdata, pkey, temppkey, tempskey;
           DBT all_skeys, skeyp, *tskeyp;
           db_pgno_t pgno;
           int cmp, have_oldrec, ispartial, nodel, re_pad, ret, s_count, t_ret;
    --- 899,905 ----
           DB_ENV *dbenv;
           DB dbp, sdbp;
           DBC dbc_n, oldopd, opd, sdbc, *pdbc;
    !      DBT olddata, oldpkey, newdata, pkey, temppkey, tempskey, tdata;
           DBT all_skeys, skeyp, *tskeyp;
           db_pgno_t pgno;
           int cmp, have_oldrec, ispartial, nodel, re_pad, ret, s_count, t_ret;
    *** 1019,1026 ****
            * should have been caught by the checking routine, but
            * add a sprinkling of paranoia.
    !      DB_ASSERT(dbenv, flags == DB_CURRENT || flags == DB_KEYFIRST ||
    !            flags == DB_KEYLAST || flags == DB_NOOVERWRITE);
            * We'll want to use DB_RMW in a few places, but it's only legal
    --- 1019,1027 ----
            * should have been caught by the checking routine, but
            * add a sprinkling of paranoia.
    !       DB_ASSERT(dbenv, flags == DB_APPEND || flags == DB_CURRENT ||
    !             flags == DB_KEYFIRST || flags == DB_KEYLAST ||
    !             flags == DB_NOOVERWRITE);
            * We'll want to use DB_RMW in a few places, but it's only legal
    *** 1048,1053 ****
    --- 1049,1107 ----
                     goto err;
                have_oldrec = 1; /* We've looked for the old record. */
    +      } else if (flags == DB_APPEND) {
    +           /*
    +            * With DB_APPEND, we need to do the insert to populate the
    +            * key value. So we swap the 'normal' order of updating
    +            * secondary / verifying foreign databases and inserting.
    +            *
    +            * If there is an append callback, the value stored in
    +            * data->data may be replaced and then freed.  To avoid
    +            * passing a freed pointer back to the user, just operate
    +            * on a copy of the data DBT.
    +            */
    +           tdata = *data;
    +           /*
    +            * If this cursor is going to be closed immediately, we don't
    +            * need to take precautions to clean it up on error.
    +            */
    +           if (F_ISSET(dbc_arg, DBC_TRANSIENT))
    +                dbc_n = dbc_arg;
    +           else if ((ret = __dbc_idup(dbc_arg, &dbc_n, 0)) != 0)
    +                goto err;
    +
    +           pgno = PGNO_INVALID;
    +
    +           /*
    +            * Append isn't a normal put operation;  call the appropriate
    +            * access method's append function.
    +            */
    +           switch (dbp->type) {
    +           case DB_QUEUE:
    +                if ((ret = __qam_append(dbc_n, key, &tdata)) != 0)
    +                     goto err;
    +                break;
    +           case DB_RECNO:
    +                if ((ret = __ram_append(dbc_n, key, &tdata)) != 0)
    +                     goto err;
    +                break;
    +           default:
    +                /* The interface should prevent this. */
    +                DB_ASSERT(dbenv,
    +                    dbp->type == DB_QUEUE || dbp->type == DB_RECNO);
    +
    +                ret = __db_ferr(dbenv, "DBC->put", 0);
    +                goto err;
    +           }
    +           /*
    +            * The append callback, if one exists, may have allocated
    +            * a new tdata.data buffer.  If so, free it.
    +            */
    +           FREE_IF_NEEDED(dbenv, &tdata);
    +           pkey.data = key->data;
    +           pkey.size = key->size;
    +           /* An append cannot be replacing an existing item. */
    +           nodel = 1;
           } else {
                /* Set pkey so we can use &pkey everywhere instead of key.  */
                pkey.data = key->data;
    *** 1400,1405 ****
    --- 1454,1465 ----
      skip_s_update:
    +       * If this is an append operation, the insert was done prior to the
    +       * secondary updates, so we are finished.
    +       */
    +      if (flags == DB_APPEND)
    +           goto done;
    +      /*
            * If we have an off-page duplicates cursor, and the operation applies
            * to it, perform the operation.  Duplicate the cursor and call the
            * underlying function.

  • Problems with inserting elements into vectors

    Hi,
    I have a problem with the setElementAt() method for vectors.
    I want to initialise a vector that is same size as a previous vector declared in my program and insert float 0.0 in all the positions.
    The code below is a for loop to do just this where count is the size of the previous vector.
    for(int i=0;i<count; i++)
                   vLargest.setElementAt(zero,i);
              }i have declared zero as a float
    float zero = 0.0f;
    the error that i'm getting is that it that the vector cannot be applied to a float.
    Can anybody tell me what i'm doing wrong?
    Thanks

    Yes you need to store Objects in your Vector not primitives.
    float is not an Object it is a primitive. But Float is an object.

Maybe you are looking for

  • Port number from verizon to family account in FL, but I live in PA

    Getting an iphone 4, I currently am with verizon and am looking to port my 917 (NYC) area code number to my family account, which is in FL.... But I live in PA. (I've moved a bunch) CSR told me that I'd have to get a number local to the area where th

  • SLD Configuaration in PI 7.0

    Hello Experts, In our Production PI system We did Install PI 7.0 , We have to Configure SLD now ... Can any one have SLD Configuaration Guide Step by Step in ABAP and JAVA side in PI 7.0 Thanks &Regards Praveen

  • PFI for AIR 2.5

    Any idea when a new Packager For iPhone will be available that supports AIR 2.5.1 rather than 2.0.1? StudioCloud (http://studiocloud.com) just released an Android app (http://blog.studiocloud.com/2010/11/new-android-app.html) that works with their ex

  • Need Firefox 3.6 for powerpc iMac with OS 10.5, where can I find a download. Newer versions won't work

    Had this version, loved it. Mistakenly upgraded and replaced with 4, which cannot run on this architecture. Need to find earlier version again, can't locate it on your site. Please make available for us who have older macs.

  • HT5361 Mail.app can't connect to Gmail, but was working fine yesterday

    Suddenly this morning gmail can't connect to server.  I tried changing the password, still nothing.  I'm getting mail in Gmail if I log into Google and I'm getting it on my phone, just not on my MackBook Air.