CB2010 Orasession can't find oci.dll

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
syscwl
Posts: 13
Joined: Mon 03 Oct 2011 17:44

CB2010 Orasession can't find oci.dll

Post by syscwl » Wed 08 May 2013 21:54

I dropped a oraSession on form...filled out and tried to click Connect box...says it can't find oci.dll...here is the oraSession object:
object OraSession1: TOraSession
Username = 'Relius_Readonly'
Password = 'RelReadOnly33y'
Server = 'Relius-DB'
LoginPrompt = False
Left = 424
Top = 40
end

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: CB2010 Orasession can't find oci.dll

Post by AlexP » Fri 10 May 2013 06:23

Hello,

Please specify the exact versions of the Oracle client and server, and the UniDAC and IDE versions.
If you have 64-bit Oracle client installed, then only a 64-bit application can work with this client (64-bit OCI.dll library). Delphi allows to create 64-bit applications since Delphi XE2, however, since Delphi is a 32-bit application, connection in design-time is possible only using 32-bit Oracle client.

syscwl
Posts: 13
Joined: Mon 03 Oct 2011 17:44

Re: CB2010 Orasession can't find oci.dll

Post by syscwl » Fri 10 May 2013 10:50

Oracle client is 11.2.0 and apparently it is not installed on my machine which I will get resolved today. The Oracle client is installed on another machine here and the oci.dll is on that machine -- its about 987k.
I'm running CBUilder 2010 with latest patches.
Can you tell from the above if this is 32 bit dll??
Can I just copy the oci.dll over to my syswow64 directory to make it work???

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: CB2010 Orasession can't find oci.dll

Post by AlexP » Fri 10 May 2013 12:07

Hello,

Simple copying of oci.dll won't help you, since in addition to the library other client libraries are required, as well as settings in the registry, environment variables, etc. You can download the 32-bit Oracle client and install it to your PC.

syscwl
Posts: 13
Joined: Mon 03 Oct 2011 17:44

Re: CB2010 Orasession can't find oci.dll

Post by syscwl » Fri 10 May 2013 15:42

OK, we installed 32 bit Oracle Client--loaded oci.dll to c:\windows\syswow64 and we now get the following error:
"Can't Initialize OCI. Error -1."

I also changed the global CB2010 Directories property to refer to
c:\Users\cleggette\Desktop\instantclient_11_2\ which is where the client is installed.

syscwl
Posts: 13
Joined: Mon 03 Oct 2011 17:44

Re: CB2010 Orasession can't find oci.dll

Post by syscwl » Fri 10 May 2013 18:54

Update -- I copied all the Oracle DLL's into the project executable directory and used oraDialog -- when ora dialog runs it seems like its trying to connect but then it says
"Project Testoracle raised exception class EOraError with message 'ORA-12154:TNS:could not resolve the connect identifier specified'

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: CB2010 Orasession can't find oci.dll

Post by AlexP » Mon 13 May 2013 10:42

Hello,

For correct work with instantclient, it is necessary to set up the Path environment variable and create the tnsnames.ora file with DB description. The detailed instantclient setting manual is at the developer site. In addition, you can use the full (installing) Oracle client. After its installation, all the settings will be configured automatically.

syscwl
Posts: 13
Joined: Mon 03 Oct 2011 17:44

Re: CB2010 Orasession can't find oci.dll

Post by syscwl » Mon 13 May 2013 15:59

May I assume the install guide you describe is an Oracle document -- I didn't find any install guide in the Devart Odac download directory????

syscwl
Posts: 13
Joined: Mon 03 Oct 2011 17:44

Re: CB2010 Orasession can't find oci.dll

Post by syscwl » Mon 13 May 2013 19:01

OK, its connected,but the dropdown box on oraTable with TableName has no contents...it should have a list of the RDB tables...any idea why....

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: CB2010 Orasession can't find oci.dll

Post by AlexP » Tue 14 May 2013 09:42

Hello,

1) The manual for Oracle clients installation can be found at the developer website Oracle.com , but not at our website.
2) Make sure that:
a) connection is established;
b) In the TOraTable.Session property an active connection is specified;
с) there are tables in the scheme you are connecting to.

syscwl
Posts: 13
Joined: Mon 03 Oct 2011 17:44

Re: CB2010 Orasession can't find oci.dll

Post by syscwl » Tue 14 May 2013 16:24

OK, we're all connected, but the oraTable is extremely slow to populate the grid [ as in 2 or 3 minutes] or we get an "Out of Memory" error...whats the best settings to make the oraTable populate snappily????

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: CB2010 Orasession can't find oci.dll

Post by AlexP » Wed 15 May 2013 14:28

Hello,

You can set the OraTable.FetchAl property to false. In this case, data will be read out by request (on scrolling in grid). In addition, if there is large Blob data in a table, the OraTable.Options.DeferredLobRead property should be set to True. In this case, Blob will be read out only on explicit access to the field. Moreover, if you are using non-standard Delphi DBGrid, the Grid may also need customization.

Post Reply