Event Calendar
<%
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 GetDataConnection = oConn
end function
%>
Experienced, Insightful, Professional WebSite Design and Construction
<%
'********************************************************************
' Name: AddEvent.asp
'
' Purpose: Used to add an event to the event database.
'
'********************************************************************
dim dbConn, strSQL
Set dbConn = GetDataConnection
strSQL = "AddEvent '" & Request("nMonth") & "/" & Request("nDay")
strSQL = strSQL & "/" & Request("nYear") & "', '"
strSQL = strSQL & Replace(Request("Event"), "'", "''") & "'"
dbConn.Execute (strSQL)
Response.Redirect("Events.asp?nMonth=" & Request("nMonth") & "&nYear=" & Request("nYear"))
%>