创建表、删除表和删除表的记录(一种窗口的判断和跳转)+ 链接确定大小的新页面

类别:Asp 点击:0 评论:0 推荐:

<%
'session.timeout=10'session对象的超时值
'on error resume next
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("examination.mdb")
Set rs = Server.CreateObject("ADODB.Recordset")
%>

<%
papername=request("papername")
sql="create table "&papername&"(题目类型 long,题目序号 long ,题目 char(50) ,本题分数 long,选择项1 char(50) ,选择项2 char(50),选择项3 char(50),选择项4 char(50),正确答案 MEMO );"
conn.execute sql%>

<%
   Subject=request.querystring("id")
   delsql="delete from 试卷信息 where 试卷名称='"&Subject&"'"
   conn.execute delsql
   t_delsql="drop table "&Subject
   conn.execute t_delsql
%>

<script language="vbscript">
msgbox"删除试卷成功!"
location.href="javascript:history.back()"
</script>  

<a href="#" onclick="window.open('madepaper.htm','create','scrollbars=no,resizable=no,width=353,height=191')">创建</a>

本文地址:http://com.8s8s.com/it/it7889.htm