How to create a Web calendar table?

Source: Internet
Author: User

Chunfeng. asp

'This page shows what has been arranged,And the link at the bottom can be turned around by month.

'This Code contains the functions used to obtain data connections.,If the data source changes,The connection information needs to be edited at only one location.(Servers, users, and passwords).

<@ LANGUAGE = "VBscript"



'The header contains the files used to start all pages.,Including global functions.

Option Explicit

Response. Buffer = True

Response. Expires = 0

Sub Dochunfeng (strtitle)




   <META HTTP-EQUIV = "Content-Type" CONTENT = "text/html; charset = gb2312">

   <Title> Galaxy video's elite schedule <% = Strtitle %> </Title>


   <Body bgcolor = "white" link = "blue" alink = "blue" vlink = "blue">

   <Basefont face = "Verdana, Arial">

   <Center> <H1> My schedule </H1>

   <H3> <% = Strtitle %> </H3>


'Create a database connection.

End sub

'CallConnectionObjectExecuteMethod,Input the text string of the command to be executed,Once a record set is available,Loop in it.

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

'As a result,UseSetCommand to send a new connection.

Set GetDataConnection = oConn

End function



Calendar. SQL

--CreateSQLServer.You only need to save a text string indicating the event nature(The maximum value is100Characters)You can..

--Create a table

Create table Schedule


IdSchedule smallint identity primary key,

DtDate smalldatetime not null,

VcEvent varchar (100) not null



--Stored Procedure

Create procedure GetSchedule (@ nMonth tinyint, @ nYear smallint)


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)


Create procedure AddEvent (@ vcDate varchar (20), @ vcEvent varchar (100 ))


Insert Schedule

Select @ vcDate, @ vcEvent


Create procedure DeleteEvent (@ idSchedule smallint)


Delete Schedule where idSchedule = @ idSchedule



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.