com.microsoft.sqlserver.jdbc.SQLServerException: 过程或函数 'proc_addEmp' 需要参数 '@Ename',但未提供该参数。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getPrepExecResponse(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PreparedStatementExecutionRequest.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
------解决方案--------------------
是不是调用存储过程的格式错了,这是我以前写的参考一下:
Connection conn=DriverManager.getConnection(
"jdbc:oracle:thin:@localhost:1521:orcl",
"wl","u123");
String sql="{call proc4(?,?,?)}"; //call关键字+过程名(问号占位符)
CallableStatement cstmt=conn.prepareCall(sql);
cstmt.setInt(1, 3333);
cstmt.setString(2, "aaaa");
cstmt.setString(3, "M");
cstmt.execute();
------解决方案--------------------
存储过程格式问题
------解决方案--------------------
楼 上 正 解