Hello,
the database kernel doesn't always deliver the name of the parameters, especially in 
older releases. Also the JDBC driver doesn't use all of the possibilities to retrieve 
the parameter names, because of the performance lack. Therefor you should use the 
index instead of the parameter name. I'll see
to adding a better support for this feature in future JDBC-releases.

Sorry,
Marco
----------------------------------------------
Marco PASKAMP
SAP DB, SAP Labs Berlin

-----Original Message-----
From: Surkov [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 2. April 2003 10:02
To: [EMAIL PROTECTED]
Subject: I can't get or set stored procedure parameters by names in JDBC.


I can't get or set stored procedure parameters by names in JDBC.
I get the following exception 
com.sap.dbtech.jdbc.exceptions.InternalJDBCError: SAP DBTech JDBC: Could not get 
column names from database kernel.

Example

Stored procedure

create dbproc test(in id integer, out name varchar(100) as
select name into :name from table where id=:id;

Java code 

CallableStatement statement=connection.prepareCall("call test(?,?)");
statement.setInt("id", 1);             // I get the exception
statement.registerOutParameter("name", java.sql.Types.VARCHAR);   // I get the 
exception
statement.setInt(1, 1);             // work's well
statement.registerOutParameter(2, java.sql.Types.VARCHAR);   // work's well
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to