trouble connecting oracle

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
zx
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 13.10.2005, 14:05

trouble connecting oracle

Post by zx »

greetings everyone.

smth strange happens..

i try to connect Oracle 9i database on winxp pro host.

I use zConnection and zQuery.

in designtime i set properties the way like:
Connection.database = db..
Connection.hostName = host..
Connection.password= usr_pwd
Connection.port = 1521
Connection.protocol= oracle or oracle9i

Protocol = 'oracle-9i'
HostName = 'taa'
Port = 1521
Database = 'zxschema'
User = 'zxshnur'
Password = 'zx'
AutoCommit = True
ReadOnly = False
TransactIsolationLevel = tiReadCommitted
Connected = True

and zQuerie's sql is something like:
select * from x

when i open zQuery in design-time it openes ok., linked grid displays records & so on.

when i try to run the app and connect database in runtime i get:

Exception EZSQLException in module Project1.exe at 000D06E7.
SQL Error: ORA-12154: TNS: unable to resolve service name

how can it happen it connects OK in designtime and fails in runtime ????

this happens with zeos DBO v.6.5.1 and v.6.5.1-latest cvs from download section as well..
suntech
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 17.11.2005, 16:00
Location: Moscow (Russia)
Contact:

Post by suntech »

Hi, zx!

Try to set LOCAL='SID' IN HKLM\SOFTWARE\ORACLE\HOME0 in your registry. Check and if it exists remove domain prefix from OracleHome\Network\Admin\tnsnames.ora (yourSID) + (change from domain name to ip), comment all lines in sqlnet.ora in the same directory.
Restart tnslistener service.

Best regards.
Lorenz
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 04.11.2005, 13:19
Location: UK
Contact:

Did the advice work ?

Post by Lorenz »

I'am getting the same error I can connect at Design time
but not with the complied exe.

keep getting following message

'Requested database driver was not found'

eventhough this has been set to oracle-9i

Strange though it works perfectly in designtime
displaying the result in grid as expected

Using Zconnect and ZReadonlyQuery

any Ideas ?
Lorenz
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 04.11.2005, 13:19
Location: UK
Contact:

Post by Lorenz »

I have tried all advice above and still get the error ?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

This might be the problem with different dll versions being loaded. If there are more versions of the oracle dll's (oci.dll) on the system, or the only version is in the path of the IDE but not the path of the exe file, you can have this kind of problems.

I don't know how you can find out which dll (and eventually dependent dll's) is exactly loaded at design time.

Mark
Lorenz
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 04.11.2005, 13:19
Location: UK
Contact:

Post by Lorenz »

Thanks for the Advice

I have run the application succesfully one a second development PC
installed on VMWARE virtual machine and connect to both local and remote Oracle DBs and it works fine.

So I imagine there must be a Second OCI.dll lurking somewhere on my normal development pc which needs to be clean out.

Oracle has been installed many times on this machine so I assume there is some garbage that needs clearing out.

Thanks for the prompt responses.

Adieu
:-)
clebernardelli
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 19.09.2006, 16:04
Location: Rio do Sul, SC

Post by clebernardelli »

Hi.

Somebody already tried to connect in the Oracle without having the Oracle client installed?

That is I want to connect using only the necessary libraries (oci.dll,…), informing the IP of the server, user, database...

Somebody ?

Thanks.
pol
Senior Boarder
Senior Boarder
Posts: 91
Joined: 13.10.2005, 08:19

Post by pol »

Hi,

Have you tried to use the Instant Client? This one consists mainly of some dlls. It can be downloaded from technet for free. You will still need a tnsnames.ora (with IP of the server etc.) and an environment variable TNS_ADMIN which points to the directory where tnsnames.ora is located.

hth

Rüdiger
Post Reply