< html > < head > < meta http-equiv="Content-Language" content="zh-cn" > < meta http-equiv="Content-Type" content="text/html; charset=gb2312" > < meta name="GENERATOR" content="Microsoft FrontPage 4.0" > < meta name="ProgId" content="FrontPage .Editor.Document" > < title >示例程序< /title > < /head > < body > < p align="center" > < font size="5" color="#008000" > 欢迎使用用ASP语言对SQL SERVER数据库操作示例< /font >< /P > < p align="center" > < /P > < p align="center" >< a href="add.asp" > 追加记录< /a >< /p > < p align="center" >< a href="query.asp" > 查 询< /a >< /p > < /body > < /html >
< html >
< head >
< meta http-equiv="Content-Type"
content="text/html; charset=gb2312" >
< meta name="GENERATOR" content=
"Microsoft FrontPage 4.0" >
< meta name="ProgId" content=
"FrontPage.Editor.Document" >
< title >追加一条新记录< /title >
< /head >
< body >
< % if request.form("cmdok")="确定" then % >
< %
set dbconnection=server.createobject
("adodb.connection") dbconnection.open"test","hxl","123"
sqlquery="insert "办公文件"
(文件名,文件内容)
values ('request.form("Txtbiaoti")','
request.form("Txtneirong")')
set recadd=dbconnection.execute(sqlquery) % >
< % else % >
< p align="center" >追加记录< /p >
< form method="POST" action="" >
< p >文件名:< input type="text"
name="Txtbiaoti" size="20" >< /p >
< p >文件内容:< /p >
< p >
< textarea rows="3"
name="Txtneirong" cols="60" >< /textarea >
< /p >
< p align="center" >< input type="submit"
value="确定" name="Cmdok" >
< input type="reset" value="重写"
name="Cmdcancel" >
< /p >< /form >
< % end if% >
< /body >
< /html >
< html >
< head >
< meta http-equiv="Content-Type"
content="text/html;charset=gb2312" >
< meta name="GENERATOR" content="Microsoft
FrontPage 4.0" >
< meta name="ProgId" content=
"FrontPage.Editor.Document" >
< title >检索文件< /title >
< /head >
< body bgcolor="#ffffdd" >
< %
set dbconnection=server.createobject
("adodb.connection")
dbconnection.open "test","hxl","123"
sqlquery="SELECT 文件名 FROM 办公文件 "
set resultlist=dbconnection.execute(sqlquery)
% >
< center >
< font color="red" >< %=request("selectsource")% >
< /font >< font color="#008000" size="5" >< b >
有以下文件可供阅览< /b >< /font >
< hr size="5" >
< table border="1" >
< tr >
< td width="200" align="center" > < b >
文件名 < /b > < /td >
< /tr >
< % do while not resultlist.eof % >
< tr >
< td valign=center width="200" >< %=resultlist
("文件名")% >< /a >< /td >
< /tr >
< %
resultlist.movenext
loop
resultlist.close
% >
< /center >
< /TABLE >
< /body >
< /html >
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有