×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    25

    Red face Open Contact DataBase.

    Hi to everyone, i am new to Symbian C++. I am using Carbide C++ Express IDE.
    In that IDE, they are given one Example to open Contact Database. When ever i try to open DefaultDatabase it's through runtime error.

    Code for openDefaultdatabase is below.

    void CContContainer::OpenDefaultDatabaseL()
    {
    // Read name of the default database
    _LIT( KOrgContactFile,"" );
    TBuf<KMaxDatabasePathAndNameLength> orgContactFile( KOrgContactFile );
    CContactDatabase::GetDefaultNameL( orgContactFile );
    orgContactFile.LowerCase();

    if ( iContactDb )
    {
    if ( !iDbName.Compare( orgContactFile ) )
    {
    return;
    }
    iContactDb->CloseTables();
    delete iContactDb;
    iContactDb = NULL;
    }

    TRAPD(err, iContactDb = CContactDatabase::OpenL( orgContactFile );
    // Check if database already exist
    if ( err == KErrNotFound )
    {

    HBufC* text = StringLoader::LoadLC( R_CONTACTS_DB_NOT_FOUND );
    CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
    informationNote->ExecuteLD( *text );
    CleanupStack::PopAndDestroy( text );
    iContactDb = NULL;
    ReadContactsFromDbL();// Update iContactArray and iContactGroupArray

    TBuf<15> noContactFile( KNullDesC );
    UpdateContactDbName( noContactFile );

    UpdateListBoxL();
    }
    else
    {
    // Update iContactArray and iContactGroupArray
    ReadContactsFromDbL();
    UpdateContactDbName( orgContactFile );
    UpdateListBoxL();
    }
    }

    Error is:
    Thread[Thread id: 3772](Suspended: Signal 'Halt' received. Description: User halted Thread.)
    38 0x60018866(EUSER.DLL)() 0x60018866
    .
    .
    .


    Can u any one tell me, what is the error.
    Last edited by ovvenkatesan; 2007-10-13 at 12:14.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Open Contact DataBase.

    It should be a panic. Depending on the SDK you use, you might have a Tools/Preferences (Ctrl+P) in your emulator, where you can check "Extended panic code file". Then you can simply press continue a couple times, and you will get a panic note in the emulator.
    If you use 2nd edition emulator or you wish getting panic notifications on the device, check http://wiki.forum.nokia.com/index.ph...ded_panic_code

  3. #3
    Super Contributor
    Join Date
    Jul 2004
    Location
    Romania
    Posts
    560

    Re: Open Contact DataBase.

    Can you change the following line from
    TRAPD(err, iContactDb = CContactDatabase::OpenL( orgContactFile );

    to
    TRAPD(err, iContactDb = CContactDatabase::OpenL();

    and let us know if you still experience problems?

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    25

    Red face Re: Open Contact DataBase.

    Thanks for ur reply pirosl,

    i hava changed ,
    TRAPD(err, iContactDb = CContactDatabase::OpenL( orgContactFile );
    to
    TRAPD(err, iContactDb = CContactDatabase::OpenL();


    Error is :


    Thread[Thread id:1408](Suspended: Signal 'Halt' received. Description: User halted thread.)

    Same Error is continuing..

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: Open Contact DataBase.

    Check the panic code.

  6. #6
    Registered User
    Join Date
    Jul 2007
    Posts
    25

    Red face Re: Open Contact DataBase.

    Yes wizard_hu_ . ur correct. I checked panic code. now error is :

    Program Closed:
    Contacts DB
    EIKCTL 42


    What i should do now??

  7. #7
    Regular Contributor
    Join Date
    Apr 2006
    Location
    India
    Posts
    383

    Re: Open Contact DataBase.

    Hi!

    EIKCTL 42 is EEikPanicColumnListInvalidBitmapIndex

    Guess something wrong in your UpdateListBoxL function..

    Debug and find the exact point of crash.
    Regards,
    Shilpa Kulkarni

  8. #8
    Registered User
    Join Date
    Jul 2007
    Posts
    25

    Re: Open Contact DataBase.

    Thanks Shilpa for your reply.

    Can u any one tell me , How to pacify the correct index for the icon.

    Thanks in advance.
    Last edited by ovvenkatesan; 2007-10-15 at 14:44.

  9. #9
    Registered User
    Join Date
    Sep 2009
    Posts
    215

    Re: Open Contact DataBase.

    Quote Originally Posted by Shilpa13 View Post
    Hi!

    EIKCTL 42 is EEikPanicColumnListInvalidBitmapIndex

    Guess something wrong in your UpdateListBoxL function..

    Debug and find the exact point of crash.
    Hi to facing the sane problem, and whenever i updating the listbox, app get crashed in iListBox->SetCurrentItemIndexAndDraw (0); in UpdateListBoxL method. Can anyone me to resolve this problem.


    Thanks in Advance.

Similar Threads

  1. Replies: 3
    Last Post: 2007-12-06, 12:55
  2. can not open the default contact database
    By znrabbit in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2007-12-06, 12:33
  3. why can't open contact in my application?
    By bily_pan in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-08-31, 02:19
  4. why can't open contact in my application?
    By bily_pan in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2006-08-30, 14:39

Posting Permissions

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