• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Oracle ODBC Driver Problems. Please help

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,
I've recently downloaded Oracle73 Version 2.05.0301 ODBC driver.
Installed ok and runs ok, but I get runtime exceptions when calling PL/SQL stored procedures with parameters. Also can't use any new features in the JDBC 2.0 API. Doesn't this Oracle ODBC driver version support what I'm trying to do? Can anybody please help?
I'm using Java 1.3/Personal Oracle 7/Windows98
Thanks
Ambrose
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can u explain what errors are u getting in detail
------------------
I.K.VISHWANATH
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by KASI VISHWANATH:
Can u explain what errors are u getting in detail


Dear Kasi,
I've recently downloaded Oracle73 Version 2.05.0301 ODBC driver.
Installed ok and runs ok, but I get runtime exceptions when calling PL/SQL
stored procedures with parameters. Also can't use any new
features in the JDBC 2.0 API. Doesn't this Oracle ODBC driver version support what I'm trying to do? Can anybody please help?
I'm using Java 1.3/Personal Oracle 7/Windows98
For example this call to my stored procedure add_address, which takes two IN parameters
...
CallableStatement storedProc =
con.prepareCall("{call add_address(?,?)}");
storedProc.setString(1,"AAAA");
storedProc.setString(2,"BBBB");
storedProc.execute();
...
Throws the following exception:
java.Sql.SQLException:[Oracle][ODBC Oracle Driver][Oracle OCI] ORA-00900: Invalid SQL statement.
Thanks
Ambrose
 
KASI VISHWANATH
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a problem in the oracle procedure .Try to use some dummy values in sql and check if it works fine there or not . Then integrate it with java . Here is a brief explanation about ora900 error
The statement is not recognized as a valid SQL statement. This error can occur if the Procedural Option is not installed and a SQL statement is issued that requires this option (for example, a CREATE PROCEDURE statement). You can determine if the Procedural Option is installed by starting SQL*Plus. If the PL/SQL banner is not displayed, then the option is not installed.

------------------
I.K.VISHWANATH
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are accesing Oracle from JDBC, you should not really be using the JDBC-ODBC bridge. There are several much better direct JDBC to Oracle drivers available which perform better, support Oracle data types better and support newer JDBC features than the JDBC-ODBC driver. Check out the JDBC drivers on the Oracle web site.
 
Ambrose Tati
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Frank,
I did check out the JDBC drivers on the Oracle web site, but did not find any JDBC drivers for my platform which is:
jdk1.3/Personal Oracle7/Windows98.
Any suggestions?
Thanks in advance
Ambrose Tati
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use JDK1.3, Win 98 and access the full Oracle 7.3 using the generic Oracle 7 drivers. Is Personal Oracle much different? It's probably worth giving the generic Oracle 7 drivers a try, they are pure Java and definately work on JDK1.3
 
Ambrose Tati
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank,
I'm a bit confused. What do you mean by generic Oracle 7 (JDBC) drivers? Are they drivers for all platforms? Can you give, a concrete example please?
Thanks in advance.
Ambrose
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Oracle "thin" drivers are pure Java, and work on any system. (you must have Java already, or you wouldn't be interested in JDBC). All the Oracle databases which I have used (various flavours of 7 and 8) work well with these "thin" drivers.
Look for a file called "classes111.zip" or "classes12_01.zip"; get one and stick it in your classpath. You may even have one already.
 
Ambrose R Tati
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Frank
I've just downloaded classes111.zip I've saved the classes111.zip in my D:\JdbcDrivers directory.
I set the CLASSPATH to point to D:\JdbcDrivers.
But when I try to compile a simple java file the following error:
Can not access class oracle.jdbc.driver.OracleDriver
Please help.
Thanks
Ambrose
 
Frank Carver
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With zip files and jar files you need to put the actual name of the file in your classpath, not just the directory it lives in. Or if you are using Java 2, you can put it into the jre/lib/ext directory, where it should be picked up automatically.
 
Ambrose Tati
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank,
Thanks a lot for your advice. To make things easy for myself I just copied into the downloaded "classes111.zip" file into my jre/lib/ext directory as you suggested and it seems fine now.
Once again, thanks a lot.
Ambrose Tati
 
Ambrose Tati
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank,
I'm trying to set up a connection string to call
DriverManager.getConnection() with, along with "Demo" as user
and "Demo" as the password on my Personal Oracle7/Windows98 as
in the following:
...
Class.forName("oracle.jdbc.driver.OracleDriver");
String connString = ...;
Connection conn =
DriverManager.getConnection(connString,pin,pin);
...
Should it be something like: "jdbc racle:thin:@" ...
Can you please help me out?
Thanks
Ambrose
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
im a user oracle odbc for windows 7.01 i have some problems about odbc driver how i provide odbc driver for oracle 7.01 pleas help me!
 
reply
    Bookmark Topic Watch Topic
  • New Topic