分类

游戏分类软件分类

unidac 5.3.9srcV6.1.3 完整源码版 For Delphi D6 -- XE6

unidac 5.3.9src

V6.1.3 完整源码版 For Delphi D6 -- XE6

大小:55.7M更新:2015-04-23

类别:编程辅助系统:WinAll,Win7

立即下载
没有数据
  • unidac 5.3.9src

UniDAC是一个功能强大的非可视化跨数据库的数据访问组件,可用于Delphi,Delphi for .NET,C++Builder,and Lazarus (Free Pascal)。它提供了对流行数据库服务器的统一访问,像Oracle,Microsoft SQL Server,MySQL,InterBase,Firebird,PostgreSQL,SQLite,DB2,Microsoft Access,Sybase Advantage Database Server,Sybase Adaptive Server Enterprise,和其他数据库(使用ODBC驱动)。

delphi第三方插件UniDac是连接数据库的组件,替换ADO所有组件 EXE一键安装,仅支持XE8,不含源码,安装后自动生成DEMO文件夹。

UniDAC是一个完整的替代dbExpress等标准的通用技术。UniDAC是一个方便的使用和高效的数据交流!

的确是5.3.9。只是在64位下安装于XE2没有安装成功,32位下到是安装成功 了。這套功能頗強,跟SqlDirect一样爱用

delphi2010下安装UniDac:

下载支持delphi2010版的Unidac,解压。

1.进入 Source/Delphi14,编辑Make.bat修改IdeDir="D:/Program Files/Embarcadero/RAD Studio/7.0 为你的Delphi2010安装路径,注意:双引号只有前半部分,没有后半部分。

2.执行Make.bat。完成后在当前目录生成一个Unidac的目录。

3.修改文件夹属性,把所有文件夹的隐藏属性去掉。(针对win7,winxp下可省略这一步)

4.修改C:/Users/All Users/Documents/RAD Studio/7.0/Bpl的访问权限,只要能进入即可。方法如下:右键点击Documents,在属性的“安全”页中选“高级”。高级页面中有一项“拒绝”,选中它,点击”更改权限”,再点击”编辑”,选中”完全控制”,一路确定。(针对win7,winxp下可省略这一步)

5..把Unidac目录下*.bpl复制到C:/Users/All Users/Documents/RAD Studio/7.0/Bpl下。(针对win7,winxp下可省略这一步)

6.打开Delphi2010,从菜单Component->Install Packages安装dclunidac140.bpl。

7.把Source目录添加到delphi的library路径,操作路径为:tools->options->environment options->Delphi options->library-win32,在library path中输入。(winxp下可省略这一步,因为第六步操作完后已经在library path中加入路径)

8.把Source/Delphi14/UniDAC/Lib目录添加到delphi的library路径。

9.OK,现在可以连接各种数据库啦

Delphi 2010安装及使用UniDAC安装过程:

1.进入"...\unidac40src\Source\Delphi14"文件夹,找到"Make.bat"文件,打开并修改IDE目录路径,如下:

set IdeDir="%PROGRAMFILES%\Embarcadero\RAD Studio\7.0 
call ..\Make.bat Delphi 14 WIN32

因为我这里Delphi 2010不是安装在默认位置,故修改如下:

set IdeDir="D:\Program Files\Embarcadero\RAD Studio\7.0 
call ..\Make.bat Delphi 14 WIN32

2.执行"Make.bat"文件,自动执行一系列操作后,到"...\unidac40src\Bin\Delphi14"目录下,可发现库已经生成完毕;
3.运行Delphi 2010,菜单→"Tools"→"Options"→"Environment Options"→"Environment Variables",添加"...\unidac40src\Bin\Delphi14"完整路径到"PATH"环境变量;
4.菜单→"Component"->"Install Packages...","Add"添加"...\unidac40src\Bin\Delphi14"目录下的"dclunidac140.bpl";
5.菜单→"Tools"→"Options"→"Environment Options"→"Delphi Options"→"Library - Win32",在"Library Path"添加"...\unidac40src\Lib\Delphi14"路径;
6.此时,已可以使用UniDAC连接数据库了。若是需要链接查看源代码,将"...\unidac40src\Source"路径也添加到"Library Path"。

测试连接MySql数据库:
1.新建一个应用程序,在面板上拖动TUniConnection、TMySQLUniProvider、TUniQuery、TUniDataSource、TDBGrid到窗体上,如下图所示:

2.右键TUniConnection,选择"Connection Editor...",填入数据库连接参数,如下图所示:
 

3.因为MySql一般设置字符集为UTF-8,而Delphi 2010工程字符集是Unicode,在"Options"页面,设置"UseUnicode"为True,这可以通知服务器,客户端和服务器双方之间的所有数据都将通过UTF-8编码,设置这个选项会转换所有的TStringField字段类型到TWideStringField字段类型,使得几乎所有的语言符号都可以正确工作,但另一方面,也引起工作延迟。

4.关联其他项,在TUniQuery的SQL里面写"select * from city",设置Active为True,运行程序,可以看到符号都可以正常显示,如下图所示:

代码实现的方式如下:

procedure TForm1.FormCreate(Sender: TObject); 
begin 
  UniQuery1.Connection := UniConnection1; 
  UniDataSource1.DataSet := UniQuery1; 
  DBGrid1.DataSource := UniDataSource1; 
  with UniConnection1 do 
  begin 
    ProviderName := 'MySQL'; 
    Username := 'root'; 
    Password := '123'; 
    Server := '192.168.82.201'; 
    Database := 'world'; 
    Port := 3306; 
    SpecificOptions.Values['UseUnicode'] := 'True'; 
    try 
      Connect; 
      UniQuery1.Close; 
      UniQuery1.SQL.Text := 'select * from city'; 
      UniQuery1.Open; 
    except 
 
    end; 
  end; 
end;

unidac连接FireBird数据库:

with conDB do     //TUniConnection

  begin

    ProviderName := 'interbase'; //这里确定为interbase 但是可以支持firebird

    Password := 'masterkey'; //数据库密码

    Username := 'sysdba'; //数据库密码

    Server := '';

    Database := 'MXDB.DB'; //数据库文件的位置,这里在当前目录

    SpecificOptions.Clear;

    SpecificOptions.Add('InterBase.ClientLibrary=gds32.dll'); //设置embeddll驱动位置or(fbembed.dll)

    SpecificOptions.Add('InterBase.CharLength=0'); //设置为0让,unidac自动读取fb设置

    SpecificOptions.Add('SQLDialet=3'); //设置为3

    SpecificOptions.Add('USEUnicode=true'); //迟滞unicode ,如果表格数据有中文,显示不正确就不需要设置

    try

      Connect;

      ShowMessage('OK');

    except

      ShowMessage('eer');

    end;

  end;

更新:

5.3.8 29-Apr-14

RAD Studio XE6 is supported

Android in C++Builder XE6 is supported

Lazarus 1.2.2 and FPC 2.6.4 is supported

SmartFetch mode for TDataSet descendants is added

The TUniDataSetOptions.MasterFieldsNullable property is added

Now update queries inside TDataSet descendants have correct owner

The SetOrderBy method behavior is fixed

The GetOrderBy method behavior is fixed

Bug with displaying already installed DAC version in setup messages is fixed

Bug with the Filter behavior in the Metadata component is fixed

Bug with AV on modify table with one only Object field is fixed

Bug with Locate when a NULL value is present in the index field is fixed

Bug with IndexFieldNames when DataTypeMapping is enabled is fixed

Bug with freeing memory in the TDADataSet.Lookup method is fixed

Bug with error processing on socket data reading under Unix is fixed

相关下载
  • 最热排行
应用排行榜

点击查看更多

关注微信随时找攻略,尽情下游戏!
打开微信
说两句网友评论
    我要跟贴
    取消
    实时热词
    步知公考免费漫画阅站有看头地铁跑酷腾讯先锋(原先游)易车汽车报价