×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Apr 2009
    Location
    Kuala Lumpur
    Posts
    98

    Exclamation Index out of bound Error!!!!!

    Hi friends,

    I've written a program for sending SMS. I have RMS record which all my phone numbers are stored init.
    Now, my problem is deleting one record. this is my segment code:

    public void DeletePhoneNumberFromDatabase()
    {
    int noe = lsDatabase.size();
    boolean selected;

    try
    {
    for(int i = 1; i <= noe; i++)
    {
    selected = lsDatabase.isSelected(i); // <<<=====
    if(selected)
    {
    db.deleteOneRecord(i);
    }
    }
    }
    catch(IndexOutOfBoundsException e)
    {
    System.out.println("Out of bound exception occured.");
    }
    }
    after simulating when i want to want one record from list, program jumps to catch and show me that message. please, tell me what is my mistake.

    the other thing is why Netbeans can't save my RMS records and each time that i run my program, i should to write my phones, while mobile can keep my records?

    thx

  2. #2
    Regular Contributor
    Join Date
    Dec 2008
    Location
    Mumbai
    Posts
    199

    Smile Re: Index out of bound Error!!!!!

    hi frnd,

    in RMS deleting is problem.if you delete any data then that place is not assigned to any other data.if you try to access it will throw exception.
    you can try this way also don't delete data insert that place some symbol like and special character.
    when you are retrieving any record then check that character if it is there then skip that record.

    thanks
    Ajay Prajapati
    Mobile Software Developer
    Mumbai,India

Similar Threads

  1. XMl Parser Implementation for Symbian
    By ittiam in forum Symbian
    Replies: 26
    Last Post: 2009-09-16, 05:26
  2. to get ssid
    By d.devendran in forum Symbian
    Replies: 4
    Last Post: 2009-07-15, 09:42
  3. playing aduio file when call is rejected.
    By santosh_sangewar in forum Symbian
    Replies: 6
    Last Post: 2009-06-12, 11:35
  4. Browser monitoring
    By NevePankaj in forum Symbian
    Replies: 19
    Last Post: 2008-08-12, 10:06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×