1、连接模式: 使用unidac有两种连接模式,非直连、直连模式。使用直连模式时客户端可以不需要安装oracle客户端,非常方便。
使用直连模式时,TUniConnection的属性和一般连接oracle差不多,只是将其Server属性改为:
TUniConnection.Server :='IP:Port:SID'; 如:
TUniConnection.Server :='192.168.1.1:1521:WEB';
非直连模式Server属性直接设置为SID即可。
2、使用TUniConnection连接数据库时,需要有对应的provider,不然无法正确创建连接。在有TUniConnection的单元,只需要根据选择的provider名称拖拉一个provider控件上去即可。