Sign in Join
Wiki copytemporary

TSQLDBLibraryLoader/zh CN

English · Français · Polski · 中文(中国)

此控件就是来解决 mysql sqlite3 这些数据库的dll文件引用问题

Warning: 本页内容为草稿,最终方案未确定,但可使用,最终方案请看Michael Van Canneyt的官方公告,此页后续有时间更新

TSQLDBLibraryLoader 是用来确定 Lazarus 和 FPC 应该从哪里加载数据库程序对应的 (DLLs/.sos/.dylibs) 这些文件. TSQLDBLibraryLoader 控件在 SQLdb tab 的 Component Palette.

使用和替代

SQLDB数据库连接控件, 最新版本的会加载一些默认库信息, 但也有可能会出错. 使用 SQLDBLibraryLoader 控件可以自定义库文件的详细位置.

SQLDBLibraryLoader 必须在 TSQLConnection 控件加载或者启用之前调用并配置.

【Google翻译机翻】提示: 通常可以通过为使用的TSQLConnection后代设置库名称来执行类似的操作. 这确实取决于支持该功能的TSQLConnection后代.

Note: 在FPC干线(2.7.1)中添加了对将SQlite与SQLDBLibraryLoader一起使用的支持,并且在早期FPC版本中不可用。 可能的选择:单元sqlite3dyn中的InitializeSQLite函数。 ``如果经过测试,请删除此文本。''

代码示例

pascal
  SQLDBLibraryLoader1.ConnectionType:='SQLite3';
// 注意: .ConnectionType 会重置 LibraryName, 因此需要在后面设置LibraryName以及ConnectionType。
  SQLDBLibraryLoader1.LibraryName := 'c:\path_to_sqllite_library\sqlite3.dll';
  SQLDBLibraryLoader1.Enabled := true; 
  SQLDBLibraryLoader1.LoadLibrary;

参考资料


From the Free Pascal wiki, page "TSQLDBLibraryLoader/zh CN", as it stood on 2020-05-16 after a change by TyphonFinger, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.