使用unidac 在linux 上无驱动直接访问MS SQL SERVER
2017-04-09 12:09
495 查看
随着delphi 10.2 开始了对Linux 的重新支持。devart 也迅速的发布了unidac 7.0,
最大的特性就是支持linux和MongoDB.
并有了其他更新:
In this release we added such significant features as:
The new UniDAC version includes a new MongoDB provider which allows you to work with a cross-platform document-oriented database MongoDB. Its main features are high performance, easy deployment and comprehensive support for the latest versions of the MongoDB server.
In DBF provider, we added support for the Direct mode. Using DBF data provider, you can work with a variety of database formats: dBaseIII-dBase10, dBase for Windows, HiPer-Six, FoxPro 2, Visual FoxPro.
Now, working with Oracle in the Direct mode becomes more appealing, we supported Oracle 12c authentication, Oracle Cloud (DbaaS), Oracle Encryption, Oracle Data Integrity. We also added support for the ANYDATA type.
What is more, for Interbase and Firebird, you have an opportunity to manage batch operations using a transaction and to obtain an active transaction number using DBMonitor.
In NexusDB data provider, we added support for using ConnectionString and the TFmtBCD fields.
更多的情况可以访问官网www.devart.com .此公司在数据库存取方面的功力,已经逆天。
今天给大家说的是利用undiac 的直连数据库功能,在Linux下不安装任何驱动,访问MS SQLSERVER 功能。
如果你没有现成的sql server 数据库,可以直接在微软的网页上下载sql server 2016 express 版,此版本为免费版本。
安装后,启动TCP/IP 支持,同时注意windows 防火墙的设置,确保网络访问正常。
在windows 上,使用客户端程序,建立一个sql server 数据库,同时建一个测试表。
输入一些测试数据
OK, 准备结束。启动delphi。
新建一个控制台工程。
再建一个datamodule
放上对应的控件
注意uniconnection 的属性设置
ok, 设置完毕
回到主程序。
在windows 上运行无误。
添加linux 平台编译支持
编译,运行程序
结果出来了。与windows 下没任何区别。
记住:我们没有在linux 下安装任何sql server 驱动。
用delphi 就这么自信!
另外,以上人名,纯属虚构,如有雷同,爱理不理。
最大的特性就是支持linux和MongoDB.
并有了其他更新:
In this release we added such significant features as:
The new UniDAC version includes a new MongoDB provider which allows you to work with a cross-platform document-oriented database MongoDB. Its main features are high performance, easy deployment and comprehensive support for the latest versions of the MongoDB server.
In DBF provider, we added support for the Direct mode. Using DBF data provider, you can work with a variety of database formats: dBaseIII-dBase10, dBase for Windows, HiPer-Six, FoxPro 2, Visual FoxPro.
Now, working with Oracle in the Direct mode becomes more appealing, we supported Oracle 12c authentication, Oracle Cloud (DbaaS), Oracle Encryption, Oracle Data Integrity. We also added support for the ANYDATA type.
What is more, for Interbase and Firebird, you have an opportunity to manage batch operations using a transaction and to obtain an active transaction number using DBMonitor.
In NexusDB data provider, we added support for using ConnectionString and the TFmtBCD fields.
更多的情况可以访问官网www.devart.com .此公司在数据库存取方面的功力,已经逆天。
今天给大家说的是利用undiac 的直连数据库功能,在Linux下不安装任何驱动,访问MS SQLSERVER 功能。
如果你没有现成的sql server 数据库,可以直接在微软的网页上下载sql server 2016 express 版,此版本为免费版本。
安装后,启动TCP/IP 支持,同时注意windows 防火墙的设置,确保网络访问正常。
在windows 上,使用客户端程序,建立一个sql server 数据库,同时建一个测试表。
输入一些测试数据
OK, 准备结束。启动delphi。
新建一个控制台工程。
再建一个datamodule
放上对应的控件
注意uniconnection 的属性设置
ok, 设置完毕
回到主程序。
program linuxdata; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils,System.Classes, dmp in 'dmp.pas' {dmf: TDataModule}; var i:integer; s:string; begin try dmf:=Tdmf.Create(nil); dmf.UniConnection1.Connected:=true; writeln('数据库版本:'+dmf.UniConnection1.ServerVersionFull); with dmf.cx do begin SQL.Clear; sql.Add('select * from TB_user'); open; for I := 0 to fields.Count-1 do begin write('|'); write( fields[i].FieldName); end; writeln('|'); while not eof do begin for I := 0 to fields.Count-1 do begin write('|'); write( fields[i].AsString) ; end; writeln('|'); next; end; end; writeln('打完收功!'); readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end.
在windows 上运行无误。
添加linux 平台编译支持
编译,运行程序
结果出来了。与windows 下没任何区别。
记住:我们没有在linux 下安装任何sql server 驱动。
用delphi 就这么自信!
另外,以上人名,纯属虚构,如有雷同,爱理不理。
相关文章推荐
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- JSP中使用JDBC驱动访问MS SQL SERVER数据库的例子
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
- 如何在Linux上安装和使用MS SQL Server
- Linux 配置 unixODBC 访问 MS SQL Server 说明
- 使用PHP、FreeTDS在Linux下连接MS SQLServer数据库 [linux]
- 在Linux下访问MS SQL Server数据库
- 在linux上配置unixODBC和FreeTDS访问MS SQL Server
- Linux 配置 unixODBC 访问 MS SQL Server 说明
- 使用PHP+FreeTDS在Linux下连接MS SQLServer数据库
- Linux下连接MS Sql server -- 使用ODBC/FreeTDS组合(详细)_徒步旅行者的空间_百度空间
- 在linux上配置unixODBC和FreeTDS访问MS SQL Server.
- linux下使用apache http server 连接 tomcat 达到使用直接apache一个服务端口就可访问php和jsp
- Linux 配置 unixODBC 访问 MS SQL Server 说明
- Linux 配置 unixODBC 访问 MS SQL Server 说明
- 使用第三方JDBC驱动JTDS代替MS SQL Server 2000驱动