如何制作一个Web日程安排表?
chunfeng.asp
' 该页面可以看到已安排了哪些事情,并在底部链接可按月前后翻动.
' 该代码包含获得数据连接的函数,如果数据源一旦有变化,则只有一个位置需要编辑连接信息(服务器、用户和口令).
<@ LANGUAGE="VBscript"
ENABLESESSIONSTATE = False %>
<%
' 表头包括用来启动所有页的文件,包括全局函数.
Option Explicit
Response.Buffer = True
Response.Expires = 0
sub Dochunfeng(strtitle)
%>
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<title>星河影动之精英日程安排<%= strtitle %></title>
</head>
<body bgcolor="white" link="blue" alink="blue" vlink="blue">
<basefont face="Verdana, Arial">
<center><h1>我的日程安排</h1>
<h3><%= strtitle %></h3>
<%
' 创建数据库连接.
end sub
' 调用Connection 对象 Execute 方法,将希望执行的命令的文本字符串传入,一旦有了记录集,就可在其中循环.
function GetDataConnection()
dim oConn, strConn
Set oConn = Server.CreateObject("ADODB.Connection")
strConn = "Provider=SQLOLEDB; Data Source=adspm; Initial Catalog=TeamWeb; "
strConn = strConn && "User Id=TeamWeb; Password=x"
oConn.Open strConn
' 作为结果,使用set命令传出新连接.
set GetDataConnection = oConn
end function
%>
Calendar.sql
-- 建立SQL服务器端.只需保存表明事件性质的一个文本字符串(最长为100个字符)即可.
-- 创建表
create table Schedule
(
idSchedule smallint identity primary key,
dtDate smalldatetime not null,
vcEvent varchar(100) not null
)
go
-- 存储过程
create procedure GetSchedule (@nMonth tinyint, @nYear smallint)
as
select idSchedule, convert(varchar, datepart(dd, dtDate)) 'nDay', vcEvent
from Schedule
where datepart(yy, dtDate) = @nYear and datepart(mm, dtDate) = @nMonth
order by datepart(dd, dtDate)
go
create procedure AddEvent (@vcDate varchar(20), @vcEvent varchar(100))
as
insert Schedule
select @vcDate, @vcEvent
go
create procedure DeleteEvent (@idSchedule smallint)
as
delete Schedule where idSchedule = @idSchedule
go[1]
编程语言
- 宿迁百度关键词排名指南:实现精准营销的关键
- 四川SEO优化怎么做网络推广
- 立昂技术备案老域名收购:如何为您的业务赋能
- 安徽百度关键词seo贵不贵,一般需要多少钱
- 吉林百度快照排名怎么做电话营销
- 多伦新手做SEO怎么做
- 甘肃优化关键词排名推广怎么做论坛营销
- 沙雅SEO网站推广:提升您的在线可见性
- 四川SEO优化如何提升销售额和销售量
- 聂荣网站排名优化:提升网站可见性的全方位指
- 涞水SEO:提升地方企业在线可见性的策略
- 辽宁百度seo排名怎样做网站排名
- 临湘哪有关键词排名优化:提升网站可见度的关
- 黑龙江百度网站优化有没有优惠
- 凉城优化关键词排名推广:提升您的网络可见性
- 萝北整站优化:提升您网站流量和排名的全面指