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"/>

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

And Java code is:

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

             "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
     [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?


View raw message