ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z...@umich.edu
Subject call procedure with SQL Server
Date Sun, 08 May 2005 14:52:34 GMT
I have following map settings:

<parameterMap id="procedure_1_Result" class="Map">
 <parameter property="P_EMPNO" javaType="java.lang.String"
  jdbcType="VARCHAR" mode="OUT"/>
 </parameterMap>

<procedure id="my_table_seq_nextval" parameterMap="procedure_1_Result">
 {call my_table_seq_nextval(?)}
</procedure>

And Java code is:

   public String call_mssql_procedure()
   {
      Map map_param = new HashMap(1);

      getSqlMapClientTemplate().insert(
             "my_table_seq_nextval", map_param);
      return ((String)map_param.get("P_EMPNO"));
   }

Bu I go the following errors:

     [java] org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [(m
apped statement)] in task 'SqlMapClientTemplate'; nested exception is com.ibatis
.common.jdbc.exception.NestedSQLException:
     [java] --- The error occurred in ibatis_map/AccessDB.xml.
     [java] --- The error occurred while applying a parameter map.
     [java] --- Check the accessdb.procedure_1_Result.
     [java] --- Check the statement (update procedure failed).
     [java] --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
for JDBC][SQLServer]Invalid object name 'sq_1'.

Any help?

-Henry


Mime
View raw message