Click here to Skip to main content
15,893,588 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Standalone Windows Application using Visual C++ and SQL DB is possible? Pin
David Crow10-Nov-15 14:41
David Crow10-Nov-15 14:41 
AnswerRe: Standalone Windows Application using Visual C++ and SQL DB is possible? Pin
Richard MacCutchan10-Nov-15 23:02
mveRichard MacCutchan10-Nov-15 23:02 
GeneralRe: Standalone Windows Application using Visual C++ and SQL DB is possible? Pin
Member 1212982016-Nov-15 11:02
Member 1212982016-Nov-15 11:02 
Questionconverting sound to text software from c++ Pin
Member 121226567-Nov-15 16:47
Member 121226567-Nov-15 16:47 
AnswerRe: converting sound to text software from c++ Pin
Richard MacCutchan7-Nov-15 21:13
mveRichard MacCutchan7-Nov-15 21:13 
QuestionKinect V2 (Converting code written for Xtion pro live to kinect v2 compatible form) Pin
ArsalanSaeed7-Nov-15 12:45
ArsalanSaeed7-Nov-15 12:45 
QuestionKinect V2 (Angle detection between 2 joints) Pin
ArsalanSaeed7-Nov-15 12:39
ArsalanSaeed7-Nov-15 12:39 
QuestionMFC CListCtrl how to Display SubItem text with tabulator ? Pin
Member 85340357-Nov-15 3:43
Member 85340357-Nov-15 3:43 
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 

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.