I am hoping you can help me out with this one. When I compile with the new dbwrapper, the app hangs on the following line:
Code: Select all
wxString sql = wxString::Format(wxT("insert into CATEGORY_V1 (CATEGNAME) VALUES('%s')"), categoryName);
My warning: "cannot pass objects of non-POD type 'const class wxString' through '...'; call will abort at runtime"
[EDIT]: got to looking around and found that GCC apparently has problems with passing a straight wxString and needs a c_str to be passed instead. I found that many other occurrences of sql queries use the .c_str() method. Example:
Code: Select all
wxString bufSQL = wxString::Format(wxT("select * from SETTING_V1 where SETTINGNAME='%s';"), settingName[b].c_str()[/b]);
Code: Select all
wxString sql = wxString::Format(wxT("insert into CATEGORY_V1 (CATEGNAME) VALUES('%s')"), categoryName);
Code: Select all
wxString sql = wxString::Format(wxT("insert into CATEGORY_V1 (CATEGNAME) VALUES('%s')"), categoryName.[b]c_str()[/b]);
Thanks Vadim for the new feature. I just wanted to post this here for future reference, and I would move this to Development, but I don't know how.
Cheers,
Wesley