当前位置: 首页 > 图文教程 > 数据库 > DB2 > 用Oracle存储过程和Oracle WebServer制作动态站点

DB2
Microsoft SQL Server 7.0数据库升级转换问题
Microsoft SQL Server 7.0数据库设置与数据结构
将Access数据库移植到Microsoft SQL Server 7.0
如何恢复系统数据库?
数据库复制技术在Internet上的实现
优化-数据库
全面优化ADO
将数据库中的数据通过client控件显示,有源代码
OSQL工具在DOS下的操作方式
用SQL Server为Web浏览器提供图像(一)(转)
用SQL Server为Web浏览器提供图像(二)(转)
用SQL Server为Web浏览器提供图像(三)(转)
用SQL Server为Web浏览器提供图像(四)(转)
用表单来提交sql(转)1
用表单来提交sql(转)2
用表单来提交sql(转)3
DB2 日期和时间的函数应用说明
DB2 常用命令速查(备忘)
DB2 常用命令小结
DB2 自动递增字段实现方法

DB2 中的 用Oracle存储过程和Oracle WebServer制作动态站点


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-31   浏览: 47 ::
收藏到网摘: n/a

create or replace PROCEDURE xj_homepage   (cols IN owa_util.ident_arr)   IS
     col_counter INTEGER;      counter INTEGER;     ID CHAR(2);     CURSOR C1 IS
    select PRIVELEGE_TABLE     from previlege_range    where PRIVELEGE_ID = ID;
     cPRIVELEGE_TABLE C1%ROWTYPE;BEGIN    htp.htmlopen;    htp.headopen;
   htp.title(主页);    htp.headclose;    htp.bodyopen;    htp.line;
   htp.img(/ows-img/ows.gif);    htp.header(1, 主页);    htp.line;
   htp.paragraph;
   select count(*) into counter from user_define where USER_ID = cols(2) and USER_PASS = cols(3);
   if (counter > 0) then
    select PRIVELEGE_ID into ID from user_define where USER_ID = cols(2) and USER_PASS = cols(3);
    htp.print( 您的权限:|| ID);       
    htp.formOpen(owa_util.get_owa_service_path|| xj_resurlts) ;
    htp.formhidden(COLS,dummy);       
    htp.formSelectOpen(COLS,选择查询表:) ;       open C1;    loop
        fetch C1 into cPRIVELEGE_TABLE;        EXIT WHEN C1%NOTFOUND;
        htp.formSelectOption(cPRIVELEGE_TABLE.PRIVELEGE_TABLE);       end loop;
    close C1;       htp.formSelectClose;       htp.paragraph;
       htp.formsubmit(NULL,确认);    htp.formClose;   else
    htp.print( 您输入的标识符:|| cols(2));    htp.paragraph;
        htp.print( 您输入的口令:|| cols(3));        htp.paragraph;
    htp.print(用户标识符或口令错!请返回登录窗口。) ;    htp.paragraph;   end if;    
      htp.anchor(http://www.sql.com.cn,sql 技术站点);       htp.line;
      htp.address((c)1998 豆腐制作);       htp.bodyclose;       htp.htmlclose;
END;  来自: ASP专区