sqlite中的数据库文件打开问题 [英] database file open problem in sqlite
本文介绍了sqlite中的数据库文件打开问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用sqlite打开一个db文件,但它抛出异常文件已加密或不是数据库。
i am trying to open a db file using sqlite but it throw a exception "file is encrypted or not a database.
#include "CppSQLite.h"
#include <ctime>
#include <iostream>
#include <fstream>
using namespace std;
const char* gszFile = "D:\\doc\\SQLiteDatabaseBrowserPortable\\Data\\asset.db";
int main(int argc, char** argv)
{
try
{
int i, fld;
time_t tmStart, tmEnd;
CppSQLiteDB db;
db.open(gszFile);
}
catch (CppSQLiteException& e)
{
cerr << e.errorCode() << ":" << e.errorMessage() << endl;
}
return 0;
}</fstream></iostream></ctime>
推荐答案
错误以某种方式未指定。你应该google它,并遍历问题。
也许你只有一个错字......
The Error is somehow unspecified. You should google it, and traverse the problem.
Maybe you have only a typo...
这篇关于sqlite中的数据库文件打开问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文