Ok I have skimmed the archives and even though people have had similar
problems there solution all point to using '' as an escape instead of
'\. However that doesnt solve my problem. I am writting a mp3player
and wanted to use sqlite as the db backend for the library. Now all
was going well untill I try inserting anything into the table I have
created.

bool LibraryDB::Insert(SongInfo* info)
{
       int rCode;
       char* errMsg;
       char* sqlStmt=sqlite3_mprintf("INSERT INTO %q
(FileName,ArtistName,TrackNum,TrackName,AlbumName,Genre,Year) values
(%q,%q,%q,%q,%q,%q,%q)",
                                                                 "Library",
                                                                 info->fileName,
                                                                
info->artistName,
                                                                 info->trackNum,
                                                                
info->trackName,
                                                                
info->albumName,
                                                                 info->genre,
                                                                 info->year);

       rCode=sqlite3_exec(m_db,sqlStmt,NULL,NULL,&errMsg);
       if(rCode==SQLITE_OK)
               return true;

       printf(errMsg);
       return false;
}

there is the function I wrote.an example of the info structure that
gives me the error is below.

info=
{
char *fileName="D:\D'Angelo - Brown Sugar\01 - D'Angelo - Brown Sugar.mp3";
char* trackNum=NULL;
char* artistName"D'Angelo";
char* trackName="Brown Sugar";
char* albumName="Brown Sugar";
char* genre=NULL;
char* year="1995";

}

Can Someone please I beg of you explain to me why I am getting the
following error message

unrecognized token: ":"

Reply via email to