RSS订阅 | 匿名投稿
您的位置:网站首页 > 数据库 > 正文

delphi 配置驱动程序(FireDAC)

作者:admin 来源: 日期:2018/3/13 14:55:52 人气: 标签:

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

 

[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;

读完这篇文章后,您心情如何?
0
0
0
0
0
0
0
0
本文网址:
下一篇:没有资料