简体   繁体   English

带有Zeoslib和Oracle Connection的Delphi XE2

[英]Delphi XE2 with Zeoslib and Oracle Connection

Can anyone help me in setting up ZeosLib 7.1.4a to connect to Oracle 11g Release 2 Standard database. 谁能帮助我设置ZeosLib 7.1.4a以连接到Oracle 11g Release 2 Standard数据库。

Currently we are using Delphi XE2, oracle is installed and the tnsnames.ora file specifies the connections to our different servers and databases, and it is also set up within BDE. 当前,我们正在使用Delphi XE2,已安装了oracle,并且tnsnames.ora文件指定了与我们不同服务器和数据库的连接,并且还在BDE中进行了设置。

We need to move away from BDE components as they are no longer available with Delphi XE3 and upwards. 我们需要远离BDE组件,因为它们在Delphi XE3及更高版本中不再可用。 We use Direct Oracle Access components, but that is a paid 3rd party software, that is why we want to move over to ZeosLib. 我们使用Direct Oracle Access组件,但这是一个付费的第三方软件,这就是为什么我们要转到ZeosLib。

What settings need to be set on the ZConnection component in order for it to connect to the oracle database, as there is a Database parameter and LibraryLocation parameter that are looking for actual files, and then there is the HostName parameter? 为了在ZConnection组件上连接到oracle数据库,需要设置哪些设置,因为有一个Database参数和LibraryLocation参数正在寻找实际文件,然后有HostName参数?

I never used Oracle, but I don't think it should be too different from Firebird, MySQL, SQL Server and others I've tried on Zeos. 我从未使用过Oracle,但我认为它与Firebird,MySQL,SQL Server和我在Zeos上尝试过的其他软件应该没有太大不同。

The properties you need to set are: 您需要设置的属性是:

  • Protocol = oracle ; Protocol = oracle ;
  • HostName = your database server ip is probably your best bet; HostName =您的数据库服务器ip可能是最好的选择; maybe you don't need this for oracle due to tnsnames... try leaving it empty 也许由于tnsnames的缘故,您不需要使用oracle ...尝试将其保留为空
  • Database = your database name. Database =您的数据库名称。 This could be a filename (in the server) or a database alias; 这可以是文件名(在服务器中)或数据库别名。
  • User = User name to connect to the database; User =用于连接数据库的用户名;
  • Password = well, the password... Password =好,密码...

LibraryLocation is the location of the client-side library (a dll) to use for the connection. LibraryLocation是用于连接的客户端库(dll)的位置。 Normally you don't need to set this property if your library is installed to your system folder or comes along with your executable. 通常,如果您的库安装在系统文件夹中或随可执行文件一起提供,则无需设置此属性。

You may also need to set the Port if it's not the default one. 如果不是默认Port则可能还需要设置Port

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM