1. db.cpp arat ve değiştir:
  2. void DBManager::Query(const char * c_pszFormat, ...)
  3. {
  4. char szQuery[4096];
  5. va_list args;
  6. va_start(args, c_pszFormat);
  7. vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
  8. va_end(args);
  9. std::string sQuery(szQuery);
  10. m_sql.AsyncQuery(sQuery.substr(0,sQuery.find_first_of(";")==-1?sQuery.length(): sQuery.find_first_of(";")).c_str());
  11. }
  12. SQLMsg * DBManager::DirectQuery(const char * c_pszFormat, ...)
  13. {
  14. char szQuery[4096];
  15. va_list args;
  16. va_start(args, c_pszFormat);
  17. vsnprintf(szQuery, sizeof(szQuery), c_pszFormat, args);
  18. va_end(args);
  19. std::string sQuery(szQuery);
  20. return m_sql_direct.DirectQuery(sQuery.substr(0, sQuery.find_first_of(";") == -1 ? sQuery.length(): sQuery.find_first_of(";")).c_str());
  21. }