Two Laptop Bag*
The moose likes JDBC and the fly likes Missing IN or OUT parameter at index:: 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Missing IN or OUT parameter at index:: 1" Watch "Missing IN or OUT parameter at index:: 1" New topic
Author

Missing IN or OUT parameter at index:: 1

Allen Bandela
Ranch Hand

Joined: Feb 16, 2006
Posts: 128

I'm getting the above SQLException while executing a PreparedStatement. I didn't get an error while testing though.



Its pretty simple. But, wonder why the exception. Driver used Oracle Jdbc driver. Has anyone faced a similar situation and what was your approach to solve it. Thanks.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

At first sight, your example code looks ok.
Maybe if you post the real code, and the complete error output, we can tell more.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
Allen Bandela
Ranch Hand

Joined: Feb 16, 2006
Posts: 128

Thanks for trying to help.Here's the code. And the exception error message is in the subject line. Its a java.sql.SQLException.
ColumnA is a Number and ColumnB is a VARCHAR2.



(Do you think that if this.columnBValue is null, it would give this exception?)

[ July 03, 2007: Message edited by: Sylvester James ]

[ July 03, 2007: Message edited by: Sylvester James ]
[ July 03, 2007: Message edited by: Sylvester James ]
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

(Do you think that if this.columnBValue is null, it would give this exception?)
That's something you can test. Try how the code behaves when the attribute has a value, and when it's null.
Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi Sylvester,

why do you have a static Preparedstatement and Connection?

Herman
PS your code does not compile, please only sent exact code (just copy/paste)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Missing IN or OUT parameter at index:: 1