aspose file tools*
The moose likes JDBC and the fly likes Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error" Watch "Error" New topic
Author

Error

Red Rose
Greenhorn

Joined: Dec 28, 2011
Posts: 4


Hi Team,


While executing above program i am getting following error, kindly help me to clear that error

java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00907: missing right parenthesis
java.sql.SQLException: [Oracle][ODBC][Ora]ORA-00907: missing right parenthesis
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6956)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7113)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3109)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:337)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:252)
at database.CreateTable.main(CreateTable.java:23)
BUILD SUCCESSFUL (total time: 0 seconds)
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

Welcome to the Ranch!

First of all, do not use ODBC. Use Oracle's JDBC driver, it performs better and is more supported.

Anyway, your error has nothing to do with Java. Try running the statement in SQL*Plus or something similar, you'll get the same error message. The problem is that the INT type in Oracle is a synonym for NUMBER(38) and cannot take any precision. You probably wanted to use NUMBER(20) instead.
 
Don't get me started about those stupid light bulbs.
 
subject: Error