调用存储过程问题
古月书斋 2004-07-07 11:34:41 小弟写了如下代码:
public ResultSet viewProduct(String productid)
{ strSQL="{call view_product(?)}";
try
{
sqlStmt=con.prepareCall(strSQL);
sqlStmt.setString(1,productid);
result= sqlStmt.executeQuery(strSQL);
}
catch(Exception e)
{
System.out.print(e);
}
return result;
}
可是上面的代码出错说:java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Invalid call Statement method: {0}
我的存储过程在企业分析器中执行都没有问题的!