Web-based event calendar using ASP and SQL (1)

Source: Internet
Author: User

This article describes how to create a Web-based calendar and how to create a Web site for developers who are not familiar with Active Server Pages (ASP), SQL, and ADO, it also provides experienced developers with Web site scalability skills.

With the development of network applications, Web-based calendars are becoming more and more important. For important events such as the deadline or schedule, or who is on vacation, web-based calendars are useful. This article describes how to use ASP in IIS and SQL Server to create a simple Web-based calendar and allow you to share your calendar with others or manage the calendar of a group of people.
Create an SQL Server
For a Web calendar, you only need to save a text string indicating the event nature on the server side. The string can contain a maximum of 100 characters. The source code is as follows:

Calendar. SQL
-- Create a table
Create table Schedule
(
IdSchedule smallint identity primary key,
DtDate smalldatetime not null,
VcEvent varchar (100) not null
)
Go
-- Stored Procedure
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


Related Article

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.