java 메모리 프로세스와 함수 호출

846 단어
저장 프로세스:매개 변수
    String rSet=null;
    CallableStatement cStatement=null;
    try {
       cStatement=connection.prepareCall("{Call sellTicketPROC(?,?,?,?,?,?,?)}");
       cStatement.setString(1, lineID);
       cStatement.setString(2, beginStation);
       cStatement.setString(3, endStation);
       cStatement.setString(4, date);
       cStatement.setString(5, TrainNum);
       cStatement.setString(6, seatTyle);
      cStatement.registerOutParameter(7,Types.VARCHAR);
       cStatement.execute();
       rs=cStatement.getString(7);//      

호출 함수:
sql="{?=call function_test(?,?)}";
st.registerOutParameter(1, Types.VARCHAR);
cStatement.setString(2, lineID);
cStatement.setString(3, beginStation);

좋은 웹페이지 즐겨찾기