How do I make a Web scheduling table?

Source: Internet
Author: User

Chunfeng.asp

' The page can see what has been arranged, and the links at the bottom can be flipped around the moon.

' This code contains functions that get data connections, and if the data source changes, only one location needs to edit the connection information (server, user, and password).

<@ language= "VBscript"

EnableSessionState = False%>

<%

' The table header includes the files used to start all pages, including global functions.

Option Explicit

Response.Buffer = True

Response.Expires = 0

Sub Dochunfeng (strtitle)

%>

the elite schedule of the stars of the Galaxy <%= strtitle%>

My schedule

<%= strtitle%>

<%

' Create a database connection.

End Sub

' Invokes the Connection object execute method, passing in the text string of the command you want to execute, and loops in it once you have a recordset.

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, the new connection is outgoing using the SET command.

Set getdataconnection = oconn

End Function

%>

Calendar.sql

--Set up the SQL Server side. Simply save a text string that indicates the nature of the event (up to 100 characters long).

--Create a table

CREATE TABLE Schedule

(

Idschedule smallint Identity Primary key,

Dtdate smalldatetime NOT NULL,

Vcevent varchar (MB) NOT NULL

)

Go

--Stored procedures

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), @vcEvent varchar (100))

As

Insert Schedule

Select @vcDate, @vcEvent

Go

CREATE PROCEDURE deleteevent (@idSchedule smallint)

As

Delete Schedule where idschedule = @idSchedule

Go

        Note : More wonderful tutorials please focus on the triple Design Tutorials section,

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: info-contact@alibabacloud.com 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.