×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Apr 2005
    Posts
    73

    how i will solve it. error occured at line 2. error is BAD FILE NAME

    how i will solve it. error occured at line 2. error is BAD FILE NAME.


    2TBufC<30> aDbFileName;

    //_LIT(aDbFileName.db,"c:\\system\data\\");
    2 CFileStore* fileStore = CPermanentFileStore::ReplaceLC( rFs, aDbFileName, EFileRead | EFileWrite );*** gives error at this line... BAD FILE NAME.

    3 fileStore->SetTypeL( fileStore->Layout( ) );

    4 RDbStoreDatabase storeDatabase;

    5 TStreamId streamId = storeDatabase.CreateL( fileStore );

    6 fileStore->SetRootL( streamId );

    7 fileStore->CommitL( );

    // Creates the Table Phone
    TRAPD( createErr, CreatePhoneTableL( storeDatabase ) );

    if ( createErr != KErrNone )
    {
    User::Leave(createErr);
    }

    storeDatabase.Close();

    CleanupStack::PopAndDestroy( fileStore );

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143
    c:\\system\data\ is a folder ... not a file name. So append your files filename to the path variable, then it might work a bit better.

    yucca

Posting Permissions

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