| Author |
Missing IN or OUT parameter at index:: 1
|
Somnath Mallick
Ranch Hand
Joined: Mar 04, 2009
Posts: 471
|
|
Hi Everyone,
I am getting an error which looks something like this.
java.sql.SQLException: Missing IN or OUT parameter at index:: 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1728)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3364)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3414)
at SchemaCleaner.AutoTruncate.main(AutoTruncate.java:56)
The part of the code that is causing the error is as follows:
Could you please help me out with this. Its kinda urgent. Thanks!!!
|
 |
Agador Paloi
Ranch Hand
Joined: Jan 24, 2006
Posts: 116
|
|
Export is not an SQL statement so is not executed as a PreparedStatement.
You will need to excute it as a Runtime.
Good luck
|
 |
Somnath Mallick
Ranch Hand
Joined: Mar 04, 2009
Posts: 471
|
|
|
So does this mean the only way to do it is runtime??? Is there any way i can incorporate it in the code? Also, is the syntax for the export query ok? Because i changed the PreparedStatement to Statement and I was getting the error and Invalid SQL command.
|
 |
Agador Paloi
Ranch Hand
Joined: Jan 24, 2006
Posts: 116
|
|
I don't think there is an API for export so you will need to use Runtime .
the code would be something like this:
you may also have to stream the output stream for any messaged produced by export.
You should test your export as a command line command to be sure your syntax and parms
are correct.
|
 |
Somnath Mallick
Ranch Hand
Joined: Mar 04, 2009
Posts: 471
|
|
Many many thanks Agador for the code example!!!
Also, i would like to know that does the SQL command export read PARFILE from the local system and export the .dmp file to the local???
Could you tell if my syntax of the export query is correct??
|
 |
Agador Paloi
Ranch Hand
Joined: Jan 24, 2006
Posts: 116
|
|
the par and dump file directory are in a directory defined as an external directory to oracle.
The best way to test the parms for your export is to execute it as a command line command .
I dont have you tables, schemas etc to tell you much more.
|
 |
 |
|
|
subject: Missing IN or OUT parameter at index:: 1
|
|
|