Given an arbitrary proc, e.g.
CREATE PROCEDURE FooBar (@foo VARCHAR(30), @bar VARCHAR(50), @result SMALLINT OUTPUT) AS ...
When querying parameter metadata, parameter modes and types always return 0, e.g.
CallableStatement cs = conn.prepareCall("{ CALL FooBar(?,?,?) }");
ParameterMetadata pm = cs.getParameterMetadata();
for (int i = 0; i < pm.getParameterCount(); i++) {
System.out.println("Mode: " + pm.getParameterMode(i+1));
System.out.println("Type: " + pm.getParameterType(i+1));
}
Prints all zeros.
I am specifically requesting parameter metadata, so I'm acknowledging an expensive metadata call. Yet nothing useful is returned.
When I use DBVisualizer with the jTDS driver, I can clearly see the stored procedure and all parameters with type and mode, so clearly the information is available.
Anonymous
Ticket moved from /p/jtds/bugs/648/