Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I investigate the parameters to send into and receive from a database stored procedure?

0
Posted

How can I investigate the parameters to send into and receive from a database stored procedure?

0

Location: http://www.jguru.com/faq/view.jsp?EID=1187 Created: Nov 21, 1999 Author: Lennart Jorelid (http://www.jguru.com/guru/viewbio.jsp?EID=15) Use the method getProcedureColumns in interface DatabaseMetaData to probe a stored procedure for metadata. The exact usage is described in the code below. NOTE! This method can only discover parameter values. For databases where a returning ResultSet is created simply by executing a SELECT statement within a stored procedure (thus not sending the return ResultSet to the java application via a declared parameter), the real return value of the stored procedure cannot be detected. This is a weakness for the JDBC metadata mining which is especially present when handling Transact-SQL databases such as those produced by SyBase and Microsoft. public static void main(String[] args) throws Exception { // Load the database driver – in this case, we // use the Jdbc/Odbc bridge driver. Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”); // Open a connection t

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123