jjklm

执行存储过程

<Code Name="SMS_DocumentType" Description="文档类型">
 <Table>SMS_documentType</Table>
 <NameField>Name</NameField>
 <ValueField>DocumentTypeID</ValueField>
 <PYField>DocumentTypeID</PYField>
 <DataModel>SMS_DocumentType</DataModel>
 <DataFilter>true</DataFilter>
 <ParentField BaseValue="0">parentid</ParentField>
 <LeafField Value="1">isleaf</LeafField>
 <Type>parentSon</Type>
</Code>


/**
     * 执行存储过程
     * @param sql
     * @return
     * @throws SQLException
     */
    public ResultSet queryProcedure(String procedure) throws SQLException {
        con = super.getConnection();
        CallableStatement cstmt = null;
        String strSql = " { call " + procedure + " } ";
        cstmt = con.prepareCall(strSql);
        rs = cstmt.executeQuery();
        return rs;
    }

posted on 2006-09-13 17:11 天涯孤客 阅读(51) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: