-
Error on connecting database
Hi guys, I am using windows XP and Oracle 9.0 When I try to connect to the database using the following statement
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
// Connect to the local database
Connection conn = DriverManager.getConnection ("jdbc  racle  ci8:@mydatabase", "scott", "tiger");
I get the following error message:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\orant\BIN\oci805jdbc.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load... Method)
Can anyone guide me please?
Thanks in advance.
Last edited by pauler; 10-25-2007 at 02:07 AM.
-
Error connecting to oracle
Oracle 9 uses the dll in the following folder C:\oracle\ora92\bin\ocijdbc9.dll the C:\orant\BIN\oci805jdbc.dll this is for previous version of Oracle.
-
Do you mean for Oracle, the path is hard coded?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
Error connecting to oracle
 Originally Posted by Hack
Do you mean for Oracle, the path is hard coded?
// Connect to the local database
Connection conn = DriverManager.getConnection ("jdbc oracle oci8:@mydatabase", "scott", "tiger");
Oracle 9 uses the dll in the following folder C:\oracle\ora92\bin\ocijdbc9.dll the C:\orant\BIN\oci805jdbc.dll this is for previous version of Oracle.
Yes, the hardcoded path must include the ocijdbc9. Your files for Oracle 9 should in the c:\oracle\ora92 the version prior to Oracle 9 used the c:\orant\..... Check to see an oracle or orant folder. Thanks.
-
-
 Originally Posted by dba
// Connect to the local database
Connection conn = DriverManager.getConnection ("jdbc oracle oci8:@mydatabase", "scott", "tiger");
Oracle 9 uses the dll in the following folder C:\oracle\ora92\bin\ocijdbc9.dll the C:\orant\BIN\oci805jdbc.dll this is for previous version of Oracle.
Yes, the hardcoded path must include the ocijdbc9. Your files for Oracle 9 should in the c:\oracle\ora92 the version prior to Oracle 9 used the c:\orant\..... Check to see an oracle or orant folder. Thanks.
I agree don't hard code. Let's try again. Remove the 8 from oci8 because it is looking for the library that in the version prior to 9 it was located in a different folder. The library that you need is the oci.
-
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
paular "0 posts" interesting ...
-
error connecting oracle
 Originally Posted by Hack
Is the oci a folder?
No, oci is a library. The error you received was telling you that oracle could not find the oci8 library. The library name changed from oci8 to oci and the location of the library changed in version 9 of oracle. It is no longer in the orant folder by in the oracle folder. Hope this helps.
-
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
Similar Threads
-
By Dazza204 in forum VB Classic
Replies: 1
Last Post: 02-13-2005, 07:32 PM
-
By Delali Dzirasa in forum .NET
Replies: 1
Last Post: 06-14-2002, 01:19 PM
-
By Ali Imran in forum VB Classic
Replies: 0
Last Post: 07-14-2001, 03:32 AM
-
By Sai in forum VB Classic
Replies: 3
Last Post: 06-07-2001, 09:13 AM
-
By mholt28 in forum VB Classic
Replies: 1
Last Post: 06-05-2000, 11:21 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks