Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
I

intelstar venus

@intelstar venus
About
Posts
7
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to make a Windows service to manage SQLite DB
    I intelstar venus

    Thank you for your kind advice. The problem was in using bad logger function. I misused it and it disturbed normal activity of my SQLiteDB engine. Now everything is OK. Thank you again.

    C / C++ / MFC database help sqlite sysadmin linux

  • How to make a Windows service to manage SQLite DB
    I intelstar venus

    Sorry, I tried to change it intentionally. The problem was settled. I found that I was so idiot. I had mistaken by using invalid Error Log function. ErrorManager::Instance()->ReportError(ErrorManager::Critical, ...); I'm very sorry to everybody. And very thanks all of you who had offered kind advises. ;)

    C / C++ / MFC database help sqlite sysadmin linux

  • How to make a Windows service to manage SQLite DB
    I intelstar venus

    "select * from hm_dbversion" reports correct result. but next "select * from hm_settings" report nothing. If we change sQuery = "select * from hm_settings" directly, it reports proper result. But it actually useless in practice, and i need to process the dynamical SQL commands in the service. I can't find the reason and crashed with a barrier. Now I have a doubt in the timing of SQL commands. I'm so sorry for your efforts, best regards!

    C / C++ / MFC database help sqlite sysadmin linux

  • How to make a Windows service to manage SQLite DB
    I intelstar venus

    Thank you for your kindly advice. But my vaccine 365 security reject it as a virus. But www.virustotal.com doesn't report it as a virus. I also have no clue on it, maybe the vaccine detects the approach to the registry by debug mode built service. Now I'm using Error log file and monitor its action. Please check this function and give me your precious advice. DALConnection::ExecutionResult SQLiteRecordset::TryOpen(std::shared_ptr pDALConn, const SQLCommand &command, String &sErrorMessage) { String sSQL = command.GetQueryString(); try { std::shared_ptr pConn = std::static_pointer_cast (pDALConn); std::shared_ptr dbengin_ = pConn->GetConnection(); AnsiString sQuery; if (!Unicode::WideToMultiByte(sSQL, sQuery)) { ErrorManager::Instance()->ReportError(ErrorManager::Critical, 5108, "SQLiteRecordset::TryOpen", "Could not convert string into multi-byte."); return DALConnection::DALUnknown; } record_cnt_ = cur_row_ = 0; field_list_.clear(); value_list_.clear(); ErrorManager::Instance()->ReportError(ErrorManager::High, 3156, "SQLiteRecordset::TryOpen", sQuery); /* sQuery = "select * from my_settings"; If I set this value like this, SQL query will be succeed, but only using sQuery normally will be failed. Simple query such as "select * from my_dbversion" will be succeed but large data querying will be failed. I don't know the clue. */ SQLite3QueryCpp query_ = dbengin_->execQuery(sQuery); int numFld = query_.numFields(); String data = "\n"; for (int i = 0; i < numFld; i++) { field_list_.push_back(query_.fieldName(i)); data += query_.fieldName(i); data += "\t"; } data += "\n"; while (!query_.eof()) { std::vector sRow; for (int i = 0; i < numFld; i++){ sRow.push_back(query_.fieldValue(i)); data += query_.fieldValue(i); data += "\t"; } data += "\n"; value_list_.push_back(sRow); record_cnt_++; query_.nextRow(); } query_.finalize(); ErrorManager::Instance()->ReportError(ErrorManager::High, 3156, "SQLiteRecordset::TryOpen ...", data); } catch (...) { ErrorManager::Instance()->ReportError(ErrorManager::High, 4202, "SQLiteRecordset::TryOpen", "An unknown error occurred while executing " + sSQL); return DALConnection::DALErrorInSQL; } return DALConnectio

    C / C++ / MFC database help sqlite sysadmin linux

  • How to make a Windows service to manage SQLite DB
    I intelstar venus

    Can I make debugging on the running service? And I'm using VS2015 but service debugging is seen somewhat different with normal application. Please teach me how to debug service program. :((

    C / C++ / MFC database help sqlite sysadmin linux

  • How to make a Windows service to manage SQLite DB
    I intelstar venus

    Thank you for your concern, I corrected my question. Please check it and give me the right way. Best regards!

    C / C++ / MFC database help sqlite sysadmin linux

  • How to make a Windows service to manage SQLite DB
    I intelstar venus

    I used CppSQLite3_2.zip freeware and wrote some Windows service to manage SQLite DB. As a simple application, it acts well. ex. In the application for test, this code reported proper value. const char* gszFile = "e:\\Test\\Database\\Server.db3"; int TryOpen(char * sql) { SQLite3DBCpp *db = new SQLite3DBCpp; db->open(gszFile); SQLite3QueryCpp q = db->execQuery("select * from my_settings"); q.finalize(); db->close(); } But after implemented as a service, it doesn't returned any values. ex. in the service program, I used the above code directly. Here I tried to give SQL cmd as a parameter. AnsiString sQuery; ... SQLite3QueryCpp q = db->execQuery(sQuery.c_str()); If I give a static command such as "select * from my_settings" instead of sQuery.c_str(), it operated properly, but it doesn't act when it receives a dynamic params. In fact, if we dumped the sQuery.c_str(), the output was "select * from my_settings". What's the matter? Please tell me the reason. I think it'll be no problem in Linux, but I don't know the Windows inside well. Please help me, Best regards!

    C / C++ / MFC database help sqlite sysadmin linux
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups