db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramin Moazeni (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-2810) getParameterType behavior is different in Embedded and Network Client when set by registerOutParameter
Date Wed, 13 Jun 2007 08:44:26 GMT
getParameterType behavior is different in Embedded and Network Client when set by registerOutParameter
------------------------------------------------------------------------------------------------------

                 Key: DERBY-2810
                 URL: https://issues.apache.org/jira/browse/DERBY-2810
             Project: Derby
          Issue Type: Bug
          Components: Network Client
    Affects Versions: 10.3.0.0
         Environment: Fedora Core release 6
            Reporter: Ramin Moazeni


Description:
=========
The behavior of getParameterType is different in embedded and network client 
as shown by the following code snippet:
--------------------------------------------------------------------------------------------------------
public void testCallableStatementReturnedScale () throws SQLException {

                Statement stmt = createStatement();
                stmt.executeUpdate("create procedure dummy_numeric_Proc(out a NUMERIC(30,15),
out b NUMERIC(30,15)) language java parameter style java external name 'org.apache.derbyTesting.functionTests.tests.jdbcapi.parameterMetaDataJdbc30.dummy_numeric_Proc'");
                CallableStatement cs = prepareCall("CALL dummy_numeric_Proc(?,?)");
                cs.registerOutParameter(1, Types.NUMERIC);
                cs.registerOutParameter(2, Types.NUMERIC,15);
                cs.execute();
               
                int numParam = cs.getParameterMetaData().getParameterCount();

                for (int i=1; i<=numParam; i++) {
                           System.out.println("getParameterType: " + cs.getParameterMetaData().getParameterType(i));
                }
                cs.close();
        }
--------------------------------------------------------------------------------------------------------

Results:
======
* Testing with org.apache.derby.jdbc.ClientDriver
getParameterType: 3 <-------Types.DECIMAL
* Testing with org.apache.derby.jdbc.EmbeddedDriver
getParameterType: 2 <-------Types.NUMERIC

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message