Here I go for what you all have advised to me. I found a wxSQLite3 Library which is a C++ + wx wrapper of SQLite.
Code:
#include "DataBase.h"
#include <string>
#include <wx/wxsqlite3.h>
#include <wx/msgdlg.h>
bool CanClose(void)
{
wxSQLite3Database DB;
wxSQLite3ResultSet RS;
DB.Open(_("SysConfig"),_(""),WXSQLITE_OPEN_READWRITE);
if(DB.IsOpen())
{
RS=DB.ExecuteQuery("SELECT config_value from configuration WHERE config_id = 1;");
if(RS.IsOk())
{
wxString WS;
WS=RS.GetAsString(_("config_value"));
//wxMessageBox(WS);
if(WS.IsSameAs(_("YES")))
{
DB.Close();
// wxMessageBox(_("Returning True"));
return true;
}
else
{
DB.Close();
return false;
}
}
}
else
{
wxMessageBox(_("Can not Open System Files"),_("Error!"));
DB.Close();
return false;
}
DB.Close();
return false;
}
But still that myth is unsolved that why sqlite3_prepare_v2 was not working