国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 編程設計 > 正文

如何制作一個Web日程安排表?

2020-06-19 13:50:05
字體:
供稿:網(wǎng)友

chunfeng.asp

' 該頁面可以看到已安排了哪些事情,并在底部鏈接可按月前后翻動.

' 該代碼包含獲得數(shù)據(jù)連接的函數(shù),如果數(shù)據(jù)源一旦有變化,則只有一個位置需要編輯連接信息(服務器、用戶和口令).

  <@ LANGUAGE="VBscript"

  ENABLESESSIONSTATE = False %>

  <%

  ' 表頭包括用來啟動所有頁的文件,包括全局函數(shù).

  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

  <%

  ' 創(chuàng)建數(shù)據(jù)庫連接.

  end sub

' 調(diào)用Connection 對象 Execute 方法,將希望執(zhí)行的命令的文本字符串傳入,一旦有了記錄集,就可在其中循環(huán).

  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服務器端.只需保存表明事件性質(zhì)的一個文本字符串(最長為100個字符)即可.

 

-- 創(chuàng)建表

  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]

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 临武县| 镇沅| 灵石县| 台前县| 宁国市| 汕尾市| 柳林县| 六枝特区| 炉霍县| 西林县| 凉山| 灵宝市| 江城| 都江堰市| 屯门区| 乐陵市| 哈尔滨市| 鄂托克旗| 罗江县| 明水县| 鹰潭市| 保定市| 通山县| 阿拉善右旗| 开原市| 湖南省| 乐东| 徐汇区| 博客| 黑山县| 张家川| 定日县| 临武县| 平原县| 吕梁市| 满城县| 梅河口市| 和硕县| 崇州市| 天长市| 保康县|