Code: Select all
const wxString dbFile = wxGetCwd() + "/test.db";
m_textctrl->AppendText(dbFile);
wxSQLite3Database db;
if (wxSQLite3Database::HasEncryptionSupport())
{
db.Open(dbFile, wxString(wxT("password")));
m_textctrl->AppendText("open db with password\n");
}
else
{
db.Open(dbFile);
m_textctrl->AppendText("open db without password\n");
}
code like abvoe , compile x64 debug done ,when it runs first time and the text.db not exist,it will ok,it can creat the test.db. While i try to run it again and the test.db exsited. It will give me an error :unhandled exception An unhandled exception occurred. I delete the test.db,then run it ,it OK. Can anyone help me and tell me why ?