这个东西在百度上找不到好的例子。我这个也有问题。各位看着改改就行了.......
部分代码:
[C++] 纯文本查看 复制代码 bool fTest;
CDbSQLite sqlite;
//チャスモエェSQLiteハセンソ・
fTest = sqlite.Open(_T("theTestSqlite.db"));
if (!fTest)
{
AfxMessageBox(_T("エサソェtheTestSqlite.db"));
return;
}
CString szQuery;
szQuery = _T("INSERT INTO user VALUES ('xiaoWang','123','2013-09-16 15-56-48')");
fTest = sqlite.DirectStatement(szQuery);
szQuery = _T("INSERT INTO user VALUES ('xdoWang','123','2013-09-16 15-56-48')");
fTest = sqlite.DirectStatement(szQuery);
szQuery = _T("INSERT INTO user VALUES ('admin','123','2013-09-16 15-56-48')");
fTest = sqlite.DirectStatement(szQuery);
if (!fTest)
AfxMessageBox(_T("イサトワエエスィア咊sersInfo"));
// CString szQuery;
// szQuery = _T("INSERT INTO usersInfo VALUES ('xiaoWang','123')");
// fTest = sqlite.DirectStatement(szQuery);
}
|