Page 1 of 1

Zeos Oracle

Posted: 03.08.2021, 07:42
by emersonldc@gmail.com
Hi!
I'm trying to connect to oracle database using Lazarus with Zeos, but I'm not getting it. In Lazarus I put the TZconnection component and define the following data:
database MyBank
Hostname: 192.168.0.46
Port 1521
user dev
password 123456
Oracle protocol
And when you click connected, the following message appears:
"SQL Error: OCI_ERROR: ORA-12154: TNS:could not resolve the connect identifier specified"
Note: I have already downloaded the oracle client corresponding to the server version and I am using the correct dlls.
Can someone help me?

Re: Zeos Oracle

Posted: 03.08.2021, 10:24
by marsupilami
Hello and welcome to the forums ;)

There is another thread where a another user has a similar issue. aehimself has posted some hints there: viewtopic.php?f=50&t=132821#p163981
Maybe this helps.

Best regards,

Jan

Re: Zeos Oracle

Posted: 03.08.2021, 18:31
by emersonldc@gmail.com
I managed to solve it as follows:

z_conexao.Connected := False;
z_conexao.Database := '192.168.0.46/orcl';
z_conexao.HostName := MyBank;
z_conexao.LibraryLocation := 'C:\Windows\oci.dll';
z_conexao.Port := 1521;
z_conexao.User := 'test';
z_conexao.Password := '123456';
z_conexao.Protocol := 'oracle';
z_conexao.LoginPrompt := False;
z_conexao.Connected := True;

Thank you for the tips!