Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Error
Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Error
After updateing my XE2 to Update 4 I no longer can connect with Oracle databases of my client. Anytime I try to connect, I have got error message:
None of the dynamic libraries can be found or is not loadable: oci.dll !
Use TZConnection.LibraryLocation if the location is invalid
Of course - I have put valid path+file name into LibraryPath, copied oci.dll into win32/debur directory, modified PATH environment variable - nothing helps, putted oci.dll into system/system32 in windows directory. Tryed to reinstal operating system - ZEOS works perfectly until Update 4 od XE2 has been installed.
Everything works perfectly at this computer on Delphi 7 + ZEOS 6.6.5-stable
Exactly the same problem occured on another two machines after updateing Delphi XE2 do Update 4, ale both have the same non-problemo on Delphi 7. Seems there is no matter which operating system I use - same problem on Vista, Win7
Problem with ZEOS 7.0.3-stable occures ONLY with Oracle database. Nothing wrong happends when using PostgreSQL, MySQL, MS SQL or SQLite databases
Has anyone any idea what should I check to correnct this strange behavior ?
None of the dynamic libraries can be found or is not loadable: oci.dll !
Use TZConnection.LibraryLocation if the location is invalid
Of course - I have put valid path+file name into LibraryPath, copied oci.dll into win32/debur directory, modified PATH environment variable - nothing helps, putted oci.dll into system/system32 in windows directory. Tryed to reinstal operating system - ZEOS works perfectly until Update 4 od XE2 has been installed.
Everything works perfectly at this computer on Delphi 7 + ZEOS 6.6.5-stable
Exactly the same problem occured on another two machines after updateing Delphi XE2 do Update 4, ale both have the same non-problemo on Delphi 7. Seems there is no matter which operating system I use - same problem on Vista, Win7
Problem with ZEOS 7.0.3-stable occures ONLY with Oracle database. Nothing wrong happends when using PostgreSQL, MySQL, MS SQL or SQLite databases
Has anyone any idea what should I check to correnct this strange behavior ?
Last edited by toyman on 28.09.2013, 20:23, edited 1 time in total.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Delphi XE2, ZEOD 7.0.3-stable and Oracle Connection Erro
Imho, don't you need to copy the oci.dll since Oracle expects some more libs.
Just use TZConnection.LibraryLocation := 'Your OCI path\oci.dll'.
May i ask for your compile target? Did you have the expected (32 or 64Bit) client installed? I think you're using the W64 target now..
Just use TZConnection.LibraryLocation := 'Your OCI path\oci.dll'.
May i ask for your compile target? Did you have the expected (32 or 64Bit) client installed? I think you're using the W64 target now..
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
I have used wrong description.
Instead of
I have tested this on Vista 32bit machine, on Win7 64bit, and fresh insallation of Win7 64bit - everytime everything works perfectly until applying Update 4 for Delphi XE2 (need that update because of one of the key component, that requires it) - after that oracle connection via ZEOS stops working.
EDIT:
I have to apologize - after putting proper oci.dll location in LibraryLocation property - error message have changed to: "OCI_ERROR: "
I have done some basic debugging (which I dropped since Delphi 7 did not have such problems), but I have stopped at TZOracleConnection.Open method, which calls GetPlainDriver.EnvNlsCreate method that returns Status=-1. Then CheckOracleError displays error dialog.
EnvNlsCreate method calls low level API function: OracleAPI.OCIEnvNlsCreate but there I have stopped. I have found Oracle API documentation for this function:
http://docs.oracle.com/cd/B10501_01/app ... i15re6.htm ,but my English is't good enough to understand what is wrong with that.
Instead of
I should saytoyman wrote: Of course - I have put valid path+file name into LibraryPath
My target platform is Win32, and oracle client is also 32bit.toyman wrote: Of course - I have put valid path+file name into LibraryLocation property in the ZConnection component
I have tested this on Vista 32bit machine, on Win7 64bit, and fresh insallation of Win7 64bit - everytime everything works perfectly until applying Update 4 for Delphi XE2 (need that update because of one of the key component, that requires it) - after that oracle connection via ZEOS stops working.
EDIT:
I have to apologize - after putting proper oci.dll location in LibraryLocation property - error message have changed to: "OCI_ERROR: "
I have done some basic debugging (which I dropped since Delphi 7 did not have such problems), but I have stopped at TZOracleConnection.Open method, which calls GetPlainDriver.EnvNlsCreate method that returns Status=-1. Then CheckOracleError displays error dialog.
EnvNlsCreate method calls low level API function: OracleAPI.OCIEnvNlsCreate but there I have stopped. I have found Oracle API documentation for this function:
http://docs.oracle.com/cd/B10501_01/app ... i15re6.htm ,but my English is't good enough to understand what is wrong with that.
Last edited by toyman on 28.09.2013, 20:23, edited 1 time in total.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Delphi XE2, ZEOD 7.0.3-stable and Oracle Connection Erro
Did check 7.0.3.
Loading multiple dll's lice oci or postgres isn't supported with 7.0.3.
Since 7.0.4 we support that.
ZPlainLoader.pas, change this function:
and it should work than.
Loading multiple dll's lice oci or postgres isn't supported with 7.0.3.
Since 7.0.4 we support that.
ZPlainLoader.pas, change this function:
Code: Select all
function TZNativeLibraryLoader.ZLoadLibrary(Location: String): Boolean;
var newpath, temp: String; // AB modif
begin
if FLoaded then
Self.FreeNativeLibrary;
temp := ''; //init for FPC
FLoaded := False;
Result := False;
newpath := ExtractFilePath(Location);
// AB modif BEGIN
try
if newpath <> '' then begin
temp := GetCurrentDir;
SetCurrentDir(newpath);
end;
// AB modif END
{$IFDEF UNIX}
{$IFDEF FPC}
FHandle := LoadLibrary(PAnsiChar(Location));
{$ELSE}
FHandle := HMODULE(dlopen(PAnsiChar(Location), RTLD_GLOBAL));
{$ENDIF}
{$ELSE}
FHandle := LoadLibrary(PChar(Location));
{$ENDIF}
// AB modif BEGIN
finally
if temp<>'' then
SetCurrentDir(temp);
end;
// AB modif END
if (FHandle <> INVALID_HANDLE_VALUE) and (FHandle <> 0) then
begin
FLoaded := True;
FCurrentLocation := Location;
Result := True;
end;
end;
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
Thank You for Your time - did't expect any reaction
I have commented old version of ZLoadLibrary function, and inserted Your version. After rebuilding - Error message did not disappeard and did not changed - it still says: "SQL Error: OCI_ERROR: "
After debugging ZLoadLibrary variables got following values:
FLoaded = TRUE
temp = <path_to_debug_folder_of_my_test_project>
Result = TRUE
newpath = D:\oracle\product\10.2.0\client_2\bin\
Location = D:\oracle\product\10.2.0\client_2\bin\oci.dll
Fhandle = 268435456
FCurrentLocation = D:\oracle\product\10.2.0\client_2\bin\oci.dll
so - it seems library is loaded, but GetPlainDriver.EnvNlsCreate(FHandle, OCI_OBJECT, nil, nil, nil, nil, 0, nil, OCI_CLIENT_CHARSET_ID, OCI_CLIENT_CHARSET_ID); function called inside TZOracleConnection.Open (ZDbcOracle.pas) function still returns value = -1
FHandle before and after executing this function has value = nil
OCI_OBIECT of course is constant with value =2
OCI_CLIENT_CHARSET_ID have value = 0
OCI_CLIENT_CHARSET_ID also have value = 0
I have commented old version of ZLoadLibrary function, and inserted Your version. After rebuilding - Error message did not disappeard and did not changed - it still says: "SQL Error: OCI_ERROR: "
After debugging ZLoadLibrary variables got following values:
FLoaded = TRUE
temp = <path_to_debug_folder_of_my_test_project>
Result = TRUE
newpath = D:\oracle\product\10.2.0\client_2\bin\
Location = D:\oracle\product\10.2.0\client_2\bin\oci.dll
Fhandle = 268435456
FCurrentLocation = D:\oracle\product\10.2.0\client_2\bin\oci.dll
so - it seems library is loaded, but GetPlainDriver.EnvNlsCreate(FHandle, OCI_OBJECT, nil, nil, nil, nil, 0, nil, OCI_CLIENT_CHARSET_ID, OCI_CLIENT_CHARSET_ID); function called inside TZOracleConnection.Open (ZDbcOracle.pas) function still returns value = -1
FHandle before and after executing this function has value = nil
OCI_OBIECT of course is constant with value =2
OCI_CLIENT_CHARSET_ID have value = 0
OCI_CLIENT_CHARSET_ID also have value = 0
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
Grumble,
may i ask if you use TCurrencyFields somewhere? If so we had a nice longstanding stack-killer in our sources. Fixed since 7.0.4.
Btw. 7.0.6 is released. You can download it on SourceForge.net.
may i ask if you use TCurrencyFields somewhere? If so we had a nice longstanding stack-killer in our sources. Fixed since 7.0.4.
Btw. 7.0.6 is released. You can download it on SourceForge.net.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
No. I'm not using TCurrencyFields.
Today I have moved to 7.1.1-rc (TZConnection.Version property says: 7.0.3-beta - I was unable to find 7.0.6 on sourceforge) and ... nothing changed. Still got OCI_ERROR
As I say - ZEOS 6.6.5-stable works on the same environment (on Delphi 7. The same machine where Delphi XE2 Update 4 is installed - on every machine with that setup) perfectly without any unexpected behaviors and errors. Byt I cannot use Delphi 7 with new project.
Today I have moved to 7.1.1-rc (TZConnection.Version property says: 7.0.3-beta - I was unable to find 7.0.6 on sourceforge) and ... nothing changed. Still got OCI_ERROR
As I say - ZEOS 6.6.5-stable works on the same environment (on Delphi 7. The same machine where Delphi XE2 Update 4 is installed - on every machine with that setup) perfectly without any unexpected behaviors and errors. Byt I cannot use Delphi 7 with new project.
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
Uh i'm sorry. 7.0.6 was staged for some days and is available now.
But i don't expect any changes in this domain. I have NO problems with oracle.
But i don't expect any changes in this domain. I have NO problems with oracle.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
I have't any problems with ZEOS and Oracle BEFORE installation Update 4 for Delphi XE2.
Question: Do You have update 4 installed in Your XE2 environment ?
Question: Do You have update 4 installed in Your XE2 environment ?
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
Nope, I don't have a XE2 compiler or later. My XE is deprecated inbetween...
Mostly i use such by making a TeamViewer-Session. So i can help as long i can not verify the issues by my selves.
Mostly i use such by making a TeamViewer-Session. So i can help as long i can not verify the issues by my selves.
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
In my case TeamViever session is not an option - I work with Oracle database via VPN, which is configurad to disable any other communication - including LAN. I cannot disable this option - this is configured by other side.
But - You say if I let You look at my environment via TV - You can spend some of You time to try solve this problem (assuming I can organize some local Oracle environment) ?
But - You say if I let You look at my environment via TV - You can spend some of You time to try solve this problem (assuming I can organize some local Oracle environment) ?
- EgonHugeist
- Zeos Project Manager
- Posts: 1936
- Joined: 31.03.2011, 22:38
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
I think so. Just prepare a local environment and i'll try my best...
Best regards, Michael
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
Hello Michael,
I do have a Computer with Delphi XE2 installed. So if you want to, I could manage to grant access to it for solving this problem.
Best regards,
Jan
I do have a Computer with Delphi XE2 installed. So if you want to, I could manage to grant access to it for solving this problem.
Best regards,
Jan
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
@toyman
Latest version of Delphi XE2 was Update 4 Hotfix 1.
http://edn.embarcadero.com/article/42282
That you use?
I had no problems with it and Oracle Database Express Edition 11g Release 2.
Michal
Latest version of Delphi XE2 was Update 4 Hotfix 1.
http://edn.embarcadero.com/article/42282
That you use?
I had no problems with it and Oracle Database Express Edition 11g Release 2.
Michal
Re: Delphi XE2, ZEOS 7.0.3-stable and Oracle Connection Erro
I have only: Delphi XE2 and C++Builder XE2 Update 4 - in the Installed Updates section of About window.
Thanks for information. I'll try install hotfix 1 and we will see if it solve problem.
Thanks for information. I'll try install hotfix 1 and we will see if it solve problem.