Can not read sqlite file from xcode project resource directory

I am using the following code to copy sqlite db file from the resource bundle to document directory on iOS.
string dbPath = CCFileUtils::sharedFileUtils()->getWritablePath();
dbPath.append(“MyDB.sqlite”);
unsigned long tmpSize;
unsigned char* dbData = CCFileUtils::sharedFileUtils()->getFileData(“MyDB.sqlite”, “rb”, &tmpSize);
FILE fp = fopen, “wb”);
fwrite;
fclose;
but i am wondering why it fails reading the file on the following line.
unsigned char
dbData = CCFileUtils::sharedFileUtils()->getFileData(“MyDB.sqlite”, “rb”, &tmpSize);

Console Log message:Get data from file(sqlite) failed!

Note plz: the same code works perfectly for png files on the same path.

Thanks in advance for your help.