lazarus 打开 sqlite3数据

感觉很简单了。
而且支持的数据库也很多。
SQLTransaction 这个功能还没研究明白
看上去是事务处理的,但是必须?
// Ensure we're using the local sqlite3.dll 64DLL
SQLiteLibraryName := 'sqlite3.dll'; //ExtractFilePath(Application.ExeName)+'sqlite3.dll';
// Set the path to the database
SQLite3Connection1.DatabaseName := ExtractFilePath(Application.ExeName)+DataBasePath; ;
// SQLite3Connection1.Open;
SQLite3Connection1.Connected := True;
//'PRAGMA synchronous = OFF;'
SQLQuery1.close;
SQLQuery1.sql.clear;
SQLQuery1.sql.add('SELECT sqlite_version();');
SQLQuery1.Open;
//StatusBar1.Panels[0].Text :='SQLite OK '+FDQuery1.FieldByName('sqlite_version()').AsString;
ShowMessage('SQLite OK '+SQLQuery1.FieldByName('sqlite_version()').AsString);

posted @ 2024-07-09 15:22  老夫子的PASCAL  阅读(160)  评论(0)    收藏  举报