views:

3006

answers:

4

I am using C to write a DLL that provides basic database connection functionality to a couple of different applications, using ODBC. When I use this DLL to connect to an Oracle database (Oracle 10g Express Edition, specifically) I get the following error message:

Specified driver could not be loaded due to system error 1114 (Oracle in XE).

After rebooting my computer, one of the applications that uses this DLL can connect to the database, but the other (more important one) still gets this message.

Does anyone know what may be causing this error and how I can fix it? I've never used Oracle before so I don't really know where to start to fix this problem. Thanks in advance for any ideas anyone out there can give.

EDIT: I checked the PATH environment variable. It begins with: C:\oraclexe\app\oracle\product\10.2.0\server\bin. That's the correct path to Oracle on my computer.

+1  A: 
  1. Setup the windows PATH to first search the ORACLE_HOME\bin related to the Oracle ODBC Driver you're trying to use, or start your application in the ORACLE_HOME\bin directory related to the ODBC driver.
  2. Make sure the version of the ODBC driver matches the version of SQL*Net you have installed.
DCookie
My PATH variable was set correctly, but when I created a variable called ORACLE_HOME and set it to the Oracle directory, my application started working. Thanks for pointing me the right direction.
Daedylus
Interesting. Usually with windows installs, setting an ORACLE_HOME environment variable causes problems, not solves them! Typically the ORACLE_HOME is set in the registry. I wonder if XE does things differently...
DCookie
A: 
  • Check if tnsping can get to your database
  • try to connect to Oracle with sqlplus
  • Check ODBC parameters. Is it Microsoft or Oracle driver?
  • Create ODBC DSN through Control panel -> Administrative Tools -> Data Sources and try to connect to Oracle
zendar
A: 

不知道以上的仁兄有没有解决的了

yusin
A: 

While connecting through JSP with Oracle 10g XE ..error comming like ...

javax.servlet.ServletException: java.lang.ClassNotFoundException: Oracle in XE

Please guide me..

Dipankar Jana
I wish I could help you, but I really don't know anything about Java. I haven't used it in nearly 10 years. Maybe posting this as a question to the general StackOverflow population would help you find the answer you need.
Daedylus