i have created a web page in windows 98 using PWS, as the web server, which uses access 97 database.
i have a problem when i run it on the windows NT server which uses iis.
the problem is i have a calendar, from which the user can enter an event,
the user clicks on the date, and then enters the text into a text box, which when submitted is calls a addevent.asp page, which adds the contents into the database, and then redirects it back to the calendar, which finds the event entered and displays the date in the calendar as red,( so the user knows that a date has been entered)
but when i run this on windows NT, the data is entered into the database, as it should. but when the calendar page is loaded, the calendar date sometimes changes red and some times it does not, and if it does not, i click on refresh page and hey presto the date turns red.
the problem i am having is that for some reason, sometimes the database is not updated by the time the calendar page loads up.
i do not know if this is a problem someone else has encounterd, or it is a problem with my coding, or if it is the problem with the server.
can some one please help me.
the code i have in addevent is
<%@ Language=VBScript %>
<%
set Conn = Server.CreateObject("ADODB.Connection"
strConnection = "DSN=contact;"
strConnection = strConnection & "UID=;PWD=;"
Conn.Open strConnection
Dim strName, tmpdate,tmptext
strName = Request.Cookies("UserName"
tmpdate = FormatDateTime(Request("EventDate", vbShortDate)
tmptext = Trim(Request("EventText")
if tmptext <> "" then
Set RSAddEvent = Server.CreateObject("ADODB.Recordset"
strQuery = "INSERT INTO Events (username, eventtext, eventdate)VALUES ('"&strname&"', '"&tmptext&"','"&tmpdate&"')"
RSAddEvent.Open strQuery, strConnection, adopenstatic
Response.Redirect("cal1.asp?EventDate=" & (Request("EventDate") & ""
else
Response.Redirect("cal1.asp"
end if
RSAddEvent.close
Set RSAddEvent = Nothing
%>
i have a problem when i run it on the windows NT server which uses iis.
the problem is i have a calendar, from which the user can enter an event,
the user clicks on the date, and then enters the text into a text box, which when submitted is calls a addevent.asp page, which adds the contents into the database, and then redirects it back to the calendar, which finds the event entered and displays the date in the calendar as red,( so the user knows that a date has been entered)
but when i run this on windows NT, the data is entered into the database, as it should. but when the calendar page is loaded, the calendar date sometimes changes red and some times it does not, and if it does not, i click on refresh page and hey presto the date turns red.
the problem i am having is that for some reason, sometimes the database is not updated by the time the calendar page loads up.
i do not know if this is a problem someone else has encounterd, or it is a problem with my coding, or if it is the problem with the server.
can some one please help me.
the code i have in addevent is
<%@ Language=VBScript %>
<%
set Conn = Server.CreateObject("ADODB.Connection"
strConnection = "DSN=contact;"
strConnection = strConnection & "UID=;PWD=;"
Conn.Open strConnection
Dim strName, tmpdate,tmptext
strName = Request.Cookies("UserName"
tmpdate = FormatDateTime(Request("EventDate", vbShortDate)
tmptext = Trim(Request("EventText")
if tmptext <> "" then
Set RSAddEvent = Server.CreateObject("ADODB.Recordset"
strQuery = "INSERT INTO Events (username, eventtext, eventdate)VALUES ('"&strname&"', '"&tmptext&"','"&tmpdate&"')"
RSAddEvent.Open strQuery, strConnection, adopenstatic
Response.Redirect("cal1.asp?EventDate=" & (Request("EventDate") & ""
else
Response.Redirect("cal1.asp"
end if
RSAddEvent.close
Set RSAddEvent = Nothing
%>