写了个应用程序,用的数据库是MySQL5.1
现在有个问题,如何能将SQL文stored procedure化??和Java怎么连接呢??
strSQL = " INSERT INTO TBL_SYOHIN " 
+ " VALUES(  " + syohinCd
+ " , '" + txtNm.getText() + "'" 
+ " , '" + txtRNm.getText() + "'"
+ " , '" + taniCd + "'";

if (txtTKin.getText().trim().equals("")) {
        strSQL = strSQL +  " ,NULL";
}
else {
strSQL = strSQL +  " , " + Long.parseLong(txtTKin.getText());
}
if (txtGKin.getText().trim().equals("")) {
strSQL = strSQL + " ,NULL ";

else {
strSQL = strSQL + " , " + Long.parseLong(txtGKin.getText());
}
strSQL = strSQL +  " , '0'" 
        + " , NOW()  " 
+ " , NULL) "; 
如上这个SQL文,如何写成stored procedure??参数怎么传递呢??
刚来CSDN,没有分,真是抱歉了
望赐教~~先谢谢了~~