delphi 配置驱动程序(FireDAC)


本文整理自网络,侵删。

 

示例驱动程序配置文件内容

 

[ASA]

; ASA base driver will use specified ODBC driver

ODBCDriver=Adaptive Server Anywhere 8.0

 

[Ora815]

; Ora815 virtual driver will use specified Oracle Home

BaseDriverID=Ora

VendorHomeWin32=OraHome815

VendorHomeWin64=OraHome815_64

 

[MySQL327]

; MySQL327 virtual driver will use specified LIBMYSQL.DLL

BaseDriverID=MySQL

VendorLib=c:\LIBMYSQL327.DLL

 

[MySQL510_Embedded]

; MySQL510_Embedded virtual driver will use specified MySQL embedded library and arguments

BaseDriverID=MySQL

VendorLib=c:\LIBMYSQLD.DLL

EmbeddedArgs=--datadir=./data;--language=./;--skip-innodb;--skip-networking

 

[MSSQL_2000]

; MSSQL_2000 virtual driver will use specified ODBC driver

BaseDriverID=MSSQL

ODBCDriver=SQL SERVER

ODBCAdvanced=

 

[FB21]

; FB21 virtual driver will use specified Firebird client library

BaseDriverID=FB

VendorLibWin32=C:\ib\fb21\bin\fbclient.dll

VendorLibWin64=C:\ib\fb21_64\bin\fbclient.dll

 

[FB21_Embedded]

; FB21_Embedded virtual driver will use specified Firebird client library

BaseDriverID=FB

VendorLib=C:\ib\fb21_embed\bin\fbembed.dll


在代码中配置驱动程序 使用合适的 tfdphysxxxdriverlink组件

interface
 
uses
  ..., FireDAC.Phys.FB;
 
type
  TForm1 = class(TForm)
  ......
    FDPhysFBDriverLink1: TFDPhysFBDriverLink;
    FDConnection1: TFDConnection;
    procedure FormCreate(Sender: TObject);
  ......
  end;
 
implementation
 
{$R *.dfm}
 
procedure TForm1.FormCreate(Sender: TObject);
begin
  FDPhysFBDriverLink1.VendorLib := 'C:\ib\fb21_embed\bin\fbembed.dll';
 
  FDConnection1.ConnectionDefName := 'FB_Demo';
  FDConnection1.Connected := True;
end;


FDConnection1.Close;
FDPhysFBDriverLink1.Release;
FDPhysFBDriverLink1.VendorLib := 'C:\fbclient.dll';
FDConnection1.Open;

相关阅读 >>

Delphi html document接口获取网页中所有图片

Delphi 替换其他程序里面的函数为自己的函数

Delphi 如何知道鼠标点击的statusbar的位置

Delphi 注入win7的单元

Delphi开发平台 raw socket

Delphi tidhttpserver开发http服务端外网无法访问

Delphi 获取文件所在路径

Delphi获取桌面图标

Delphi简单加密解密

Delphi win10系统已管理员的权限运行应用程序

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...