Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
Richard MacCutchan7-Nov-15 5:04
mveRichard MacCutchan7-Nov-15 5:04 
GeneralRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
Member 85340357-Nov-15 5:08
Member 85340357-Nov-15 5:08 
GeneralRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
Richard MacCutchan7-Nov-15 5:51
mveRichard MacCutchan7-Nov-15 5:51 
GeneralRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
Member 85340357-Nov-15 6:30
Member 85340357-Nov-15 6:30 
GeneralRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
Richard MacCutchan7-Nov-15 7:16
mveRichard MacCutchan7-Nov-15 7:16 
QuestionRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
David Crow8-Nov-15 9:24
David Crow8-Nov-15 9:24 
AnswerRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
Member 85340358-Nov-15 21:24
Member 85340358-Nov-15 21:24 
AnswerRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
David Crow9-Nov-15 1:59
David Crow9-Nov-15 1:59 
QuestionHow to make a Windows service to manage SQLite DB Pin
intelstar venus1-Nov-15 11:41
intelstar venus1-Nov-15 11:41 
AnswerRe: How to make a Windows service to manage SQLite DB Pin
Richard MacCutchan1-Nov-15 22:07
mveRichard MacCutchan1-Nov-15 22:07 
GeneralMessage Closed Pin
2-Nov-15 4:53
intelstar venus2-Nov-15 4:53 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
Richard MacCutchan2-Nov-15 5:01
mveRichard MacCutchan2-Nov-15 5:01 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus2-Nov-15 5:20
intelstar venus2-Nov-15 5:20 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
Richard MacCutchan2-Nov-15 5:22
mveRichard MacCutchan2-Nov-15 5:22 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus2-Nov-15 5:41
intelstar venus2-Nov-15 5:41 
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<dalconnection> pDALConn, const SQLCommand &command, String &sErrorMessage)
{

String sSQL = command.GetQueryString();
try
{
std::shared_ptr<sqliteconnection> pConn = std::static_pointer_cast <sqliteconnection>(pDALConn);
std::shared_ptr<sqlite3dbcpp> 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<ansistring> 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 DALConnection::DALSuccess;
}

Error Log look like this

ERROR" 5928 "2015-11-02 18:17:33.876" "Severity: 1 (Critical), Code: HM3156, Source: SQLiteConnection::Connect Starting..., Description: e:\develop\MiniMail\Test\Database\MailServer.db3"
"ERROR" 5928 "2015-11-02 18:17:33.877" "Severity: 2 (High), Code: HM3156, Source: SQLiteRecordset::TryOpen, Description: select * from hm_dbversion"
"ERROR" 5928 "2015-11-02 18:17:33.879" "Severity: 2 (High), Code: HM3156, Source: SQLiteRecordset::TryOpen ..., Description:
value

5601

"
"ERROR" 5928 "2015-11-02 18:17:33.879" "Severity: 2 (High), Code: HM3156, Source: SQLiteRecordset::FindRecValue found..., Description: value==>5601"
"ERROR" 5928 "2015-11-02 18:17:33.879" "Severity: 2 (High), Code: HM3156, Source: SQLiteRecordset::TryOpen, Description: select * from hm_settings"
"ERROR" 5928 "2015-11-02 18:17:33.879" "Severity: 3 (Medium), Code: HM5015, Source: PropertySet::GetProperty_(), Description: The property usescriptserver could not be found."
GeneralRe: How to make a Windows service to manage SQLite DB Pin
Richard MacCutchan2-Nov-15 6:25
mveRichard MacCutchan2-Nov-15 6:25 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus2-Nov-15 6:44
intelstar venus2-Nov-15 6:44 
QuestionRe: How to make a Windows service to manage SQLite DB Pin
David Crow2-Nov-15 9:14
David Crow2-Nov-15 9:14 
AnswerRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus2-Nov-15 21:28
intelstar venus2-Nov-15 21:28 
AnswerRe: How to make a Windows service to manage SQLite DB Pin
jschell3-Nov-15 16:12
jschell3-Nov-15 16:12 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus4-Nov-15 1:05
intelstar venus4-Nov-15 1:05 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
jschell7-Nov-15 4:58
jschell7-Nov-15 4:58 
Questionsocket:send integer Pin
Member 114755491-Nov-15 4:51
Member 114755491-Nov-15 4:51 
QuestionRe: socket:send integer Pin
Richard MacCutchan1-Nov-15 5:36
mveRichard MacCutchan1-Nov-15 5:36 
AnswerRe: socket:send integer Pin
Member 114755496-Nov-15 4:15
Member 114755496-Nov-15 4:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.