×

Discussion Board

Results 1 to 15 of 30

Hybrid View

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    43

    TCommDbConnPref - Invalid Format

    I am using TCommDbConnPref to discover the different IAPs available.

    When I run my app in phone debug mode my TCommDbConnPref object is described as Invalid Format.

    When I run it in emulator mode it is ok.

    I notice that the first phase constructor is not called in Phone debug mode but it is called in emulator mode.

    CHTTPEngine::CHTTPEngine(MClientObserver& aObserver)
    : iObserver(aObserver),
    iPostData(NULL),
    iRunning(EFalse),
    iConnectionSetupDone(EFalse),
    iPrevProfileId(-1)
    {

    }
    // Now we have the iap Id. Use it to connect for the connection
    TCommDbConnPref connectPref;
    // Setup preferences
    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    // Sets the CommDb ID of the IAP to use for this connection
    connectPref.SetIapId(iSelectedIap);
    // Start connection
    ------> User::LeaveIfError(iConnection.Start(connectPref)); //<------------------failing here
    Appreciate any guidance

  2. #2
    Registered User
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    370

    Re: TCommDbConnPref - Invalid Format

    Hi,

    Are the variables iSelectedIap & iConnection initialized?

    Also what is the error you get?
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    43

    Re: TCommDbConnPref - Invalid Format

    Hi

    iSelectedIap is initialized; in this case to 3

    iConnection is also Invalid format. It is of type RConnection

    Not getting any error; just a panic and the application aborts.

    thanks

  4. #4
    Registered User
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    370

    Re: TCommDbConnPref - Invalid Format

    Hi,

    You need to open a connection to SocketServe and then open a RConnection before you can use it further(iConnection.Start).

    Have a look at the code over here
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,572

    Re: TCommDbConnPref - Invalid Format

    Quote Originally Posted by nstapleton View Post
    Not getting any error; just a panic and the application aborts.
    "just a panic"... http://wiki.forum.nokia.com/index.ph...ded_panic_code

  6. #6
    Registered User
    Join Date
    Apr 2009
    Posts
    43

    Re: TCommDbConnPref - Invalid Format

    Yes - I do that already:

    // IAP Selected
    // Open socket server and start the connection
    User::LeaveIfError(iSocketServ.Connect());
    User::LeaveIfError(iConnection.Open(iSocketServ));
    // Now we have the iap Id. Use it to connect for the connection
    TCommDbConnPref connectPref;
    // Setup preferences
    connectPref.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    // Sets the CommDb ID of the IAP to use for this connection
    connectPref.SetIapId(iSelectedIap);
    // Start connection
    User::LeaveIfError(iConnection.Start(connectPref));
    I am convinced it is to with the "Invalid Format" of connectPref and iConnection. Can anyone explain that?

  7. #7
    Registered User
    Join Date
    Feb 2007
    Location
    Tampere
    Posts
    370

    Re: TCommDbConnPref - Invalid Format

    Hi,

    Just Out of curiosity, iSelectedIap what is this initialized to?
    You can look up into the table using following
    Code:
    // initialize a view
         CCommsDbConnectionPrefTableView* commDBView =
         commDB->OpenConnectionPrefTableInRankOrderLC(ECommDbConnectionDirectionOutgoing);
    
    
         // go to the first record
         User::LeaveIfError(commDBView->GotoFirstRecord());
    
         // Declare a prefTableView Object.
         CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref;
    
         // read the connection preferences
         commDBView->ReadConnectionPreferenceL(pref);
         //TUint32 iapID = pref.iBearer.iIapId;
         iIapID = pref.iBearer.iIapId;
    In case of your code iIAPID == iSelectedIap

    Also check if there are any valid accesspoints on your device/Emulator
    Regards

    - MVP
    "Dare To Dream" - A.P.J.Kalam

Similar Threads

  1. Error in packaging process :(
    By a-eqla3 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2008-07-24, 20:33
  2. Replies: 7
    Last Post: 2006-09-20, 23:46

Posting Permissions

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