wood burning stoves 2.0
The moose likes JDBC and Relational Databases and the fly likes calling Oracle Function, Type conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "calling Oracle Function, Type conversion" Watch "calling Oracle Function, Type conversion" New topic

calling Oracle Function, Type conversion

Pavan Kumar
Ranch Hand

Joined: Jan 23, 2004
Posts: 78
I have to invoke an Oracle Funtion that has 37 parameters. I have carefully set the parameters for my Callable Statement Object, but I was getting a SQLException Not all variables are bound.

I have tried to cross check the data types and made sure (or so I thought) the types are appropriate, after a very long exercise I was still greeted with the same Exception.

I have come up with a work around, after discussing with one of collegues. I would like to know your opinions and suggestion. I am hopeful that somebody will point me in the right direction that is easier and cleaner.

My solution looks like following

columnTypeMappings is a LinkedHashMap, I iterate through the map and based on the type name I invoke
stmt.setxxxx(index, value);

is there any better way of doing this?

Thanks very much for your attention and time.

[ June 14, 2005: Message edited by: cnu sri ]

formerly known as Cnu
I agree. Here's the link: http://aspose.com/file-tools
subject: calling Oracle Function, Type conversion
It's not a secret anymore!