16,748
社区成员
发帖
与我相关
我的任务
分享
constructor TSQLiteDatabase.Create(const FileName: string);
var
Msg: PAnsiChar;
iResult: integer;
utf8FileName: UTF8string;
begin
inherited Create;
fParams := TList.Create;
self.fInTrans := False;
Msg := nil;
try
utf8FileName := UTF8String(FileName);
iResult := SQLite3_Open(PAnsiChar(utf8FileName), Fdb);
if iResult <> SQLITE_OK then
........
slDBPath := ExtractFilepath(application.exename)+ 'test.db';
// slDBPath := 'test.db';
Memo1.Lines.Add(slDBPath);
sldb := TSQLiteDatabase.Create(slDBPath);
constructor TSQLiteDatabase.Create(const FileName: string);
var
Msg: PAnsiChar;
iResult: integer;
// utf8FileName: UTF8string;
begin
inherited Create;
fParams := TList.Create;
self.fInTrans := False;
Msg := nil;
try
// utf8FileName := UTF8String(FileName);
// iResult := SQLite3_Open(PAnsiChar(utf8FileName), Fdb);
iResult := SQLite3_Open(PAnsiChar(FileName), Fdb);
......