Hi,
I am using Oracle8i. I have a stored procedure which has an out parameter whose datatype is as

TYPE v1 IS TABLE OF VARCHAR2(4000) INDEX BY BINARY_INTEGER;

I am using JDBC ODBC Bridge to connect to Oracle and run the procedure. The java code I have written is as follows :

import java.sql.*;

public class jdbc3
{
public static void main(String args[]) throws Exception
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:java_test", "amit", "amit");

CallableStatement stmt = con.prepareCall("{call GET_TAB1(?)}");
stmt.registerOutParameter(1, java.sql.Types.OTHER, "TABLE");

stmt.execute();


stmt.close();
con.close();
}
}


It is giving me a runtime error as follows :

java.sql.SQLException: [Microsoft][ODBC driver for Oracle]Wrong number of parameters

I am unable to run the code and get the out parameter. I want to receive the parameter and display each record one by one.

Someone please help me out.


Thanks a lot,

Amitava