473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Type mismatch "CInt"

1
I am a real beginnner in ASP. Due to increasing demands on dynamic website, I've been working on ASP website now. I use a ready to use CMS program and right now I've been trying to combine a calendar module into my CMS.
The calendar works fine except that if I click on the date or the month earlier or later, the page always goes back to the first page which is first opened. You can take a look at this address: http://www.dewaterlely.nl/ontvangst/trouwen/
Try the link: ">>" or click on any date on the calendar. It returns the basic URL of the website, not the new generated page that I've made with CMS. The page itself is made of few frames in one page. I've tried few things (Click on "<<")
I got "type Mismatch " CInt"

I don't know what I should do. Can anyone help?
Follows is de script of the calendar:

<%
'**************************************
' Name: ECDesigns Event Calender
' Description:Simple ASP Events Calender
' By: Craig G SMith.
'
' This code is copyrighted and has
' limited warranties. Visit
' http://www.ecddesigns.co.za
' for details.
'**************************************
%>
<!--#include virtual="/ontvangst/calendar/db.asp"-->
<!--#include virtual="/ontvangst/calendar/functions.asp"-->
<%

If IsDate(Request.QueryString("date")) Then
dDate = CDate(Request.QueryString("date"))
Else
If IsDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year")) Then
dDate = CDate(Request.QueryString("month") & "-" & Request.QueryString("day") & "-" & Request.QueryString("year"))
Else
dDate = Date()
If Len(Request.QueryString("month")) <> 0 Or Len(Request.QueryString("day")) <> 0 Or Len(Request.QueryString("year")) <> 0 Or Len(Request.QueryString("date")) <> 0 Then
Response.Write "Wrong date.<BR><BR>"
End If
End If
End If

iDIM = GetDaysInMonth(Month(dDate), Year(dDate))
iDOW = GetWeekdayMonthStartsOn(dDate)
mnth = MaandNaam(Month(dDate))
%>
<link rel="stylesheet" href="../styles/style.css" type="text/css">
<TABLE width="100%" BORDER=0 align="center" CELLPADDING=0 CELLSPACING=0 class="ruta">
<TR>
<TD><TABLE width="100%" BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD ALIGN="left" COLSPAN=7>
<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD ALIGN="right"><div align="left"><A HREF="default2.asp?active_page_id=<%=active_page_i d%>?date=<%= SubtractOneMonth(dDate) %>">&lt;&lt;</A></div></TD>
<TD ALIGN="center"><font size="1"><B><%= mnth & " <br> " & Year(dDate) %></B></font></TD>
<TD ALIGN="left"><div align="right"><A HREF="<%=request.servervariables("url")%>?date=<%= AddOneMonth(dDate) %>">&gt;&gt;</A></div></TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TD ALIGN="center"><strong>M</strong></TD>
<TD ALIGN="center"><strong>D</strong></TD>
<TD ALIGN="center"><B>W</B></TD>
<TD ALIGN="center"><strong>D</strong></TD>
<TD ALIGN="center"><B>V</B></TD>
<TD ALIGN="center"><B>Z</B></TD>
<TD ALIGN="center"><B>Z</B></TD>
</TR>
<%

If iDOW <> 1 Then
Response.Write vbTab & "<TR>" & vbCrLf
iPosition = 1
Do While iPosition < iDOW
Response.Write vbTab & vbTab & "<TD>&nbsp;</TD>" & vbCrLf
iPosition = iPosition + 1
Loop
End If

iCurrent = 1
iPosition = iDOW
Do While iCurrent <= iDIM
If iPosition = 1 Then
Response.Write vbTab & "<TR>" & vbCrLf
End If

If iCurrent = Day(dDate) Then
Response.Write vbTab & vbTab & "<TD align=center class=""inmatning""><b><font size=4><font color=#F49100>" & iCurrent & "</font></font></b></TD>" & vbCrLf
Else
'Response.Write vbTab & vbTab & "<TD align=center><font size=2>" & iCurrent & "</font></TD>" & vbCrLf

Response.Write vbTab & vbTab & "<TD align=center><A HREF=""" & request.servervariables("url") & "?date=" & Year(dDate) & "-" & Month(dDate) & "-" & iCurrent & """>" & iCurrent & "</A></TD>" & vbCrLf
End If

If iPosition = 7 Then
Response.Write vbTab & "</TR>" & vbCrLf
iPosition = 0
End If

iCurrent = iCurrent + 1
iPosition = iPosition + 1
Loop

If iPosition <> 1 Then
Do While iPosition <= 7
Response.Write vbTab & vbTab & "<TD>&nbsp;</TD>" & vbCrLf
iPosition = iPosition + 1
Loop
Response.Write vbTab & "</TR>" & vbCrLf
End If
%>
</TABLE></TD>
</TR>
<tr>
<td><hr></td>
</tr>
<tr>
<td><p><b>Evenementen:</b></p>
<p class="Highlight"><B>Vandaag: </B></p></td>
</tr>
<%
set getoday = dbconn.execute("Select * from events where eventyear = '" & year(ddate) & "' and eventmonth = '" & month(ddate) & "' and eventday= " & day(ddate) & " ")
while not getoday.bof and not getoday.eof%>
<tr>
<td> <%=getoday("eventhead")%><br>
<%=getoday("eventdesc")%><br>
<a href="<%=getoday("eventlink")%>" target="_parent">URL</a>
<hr></td>
</tr>
<% getoday.movenext
wend%>
<tr class="HighlightCopy">
<td><b>Volgende :</b></td>
</tr>
<%dtdt = cInt(day(ddate))%>
<% set getnext = dbconn.execute("Select * from events where eventyear = '" & year(ddate) & "' and eventmonth = '" & month(ddate) & "' and eventday > " & dtdt & " ")
while not getnext.bof and not getnext.eof%>
<tr>
<td> <%=getnext("eventhead")%><br>
<%=getnext("eventdesc")%><br>
<a href="<%=getnext("eventlink")%>" target="_parent">URL</a>
<hr></td>
</tr>
<% getnext.movenext
wend%>
<% if month(ddate) < 12 then
nyear = year(ddate)
nmonth =month(ddate) + 1
else
nyear = year(ddate) + 1
nmonth = 1
end if%>
<% set getnext = dbconn.execute("Select * from events where eventyear = '" & nyear & "' and eventmonth = '" & nmonth & "' ")
while not getnext.bof and not getnext.eof%>
<tr>
<td> <%=getnext("eventhead")%><br>
<%=getnext("eventdesc")%><br>
<a href="<%=getnext("eventlink")%>" target="_parent">URL</a>
<hr></td>
</tr>
<% getnext.movenext
wend%>
<tr class="HighlightCopy2">
<td><b>Vorige :</b></td>
</tr>
<%dtdt = cInt(day(ddate))%>
<% set getnext = dbconn.execute("Select * from events where eventyear = '" & year(ddate) & "' and eventmonth = '" & month(ddate) & "' and eventday < " & dtdt & " ")
while not getnext.bof and not getnext.eof%>
<tr>
<td> <%=getnext("eventhead")%><br>
<%=getnext("eventdesc")%><br>
<a href="<%=getnext("eventlink")%>" target="_parent">URL</a>
<hr></td>
</tr>
<% getnext.movenext
wend%>
<% if month(ddate) > 1 then
nyear = year(ddate)
nmonth =month(ddate) - 1
else
nyear = year(ddate) - 1
nmonth = 12
end if%>
<% set getnext = dbconn.execute("Select * from events where eventyear = '" & nyear & "' and eventmonth = '" & nmonth & "' ")
while not getnext.bof and not getnext.eof%>
<tr>
<td><%=getnext("eventhead")%><br>
<%=getnext("eventdesc")%><br>
<a href="<%=getnext("eventlink")%>" target="_parent">URL</a>
<hr></td>
</tr>
<% getnext.movenext
wend%>
<tr>
<td>
<a href="http://www.ecddesigns.co.za" target="_Blank"><small>Events Calander door
ECDesigns</small></a>
</tr></td>
</table>
Sep 12 '06 #1
1 5910
iam_clint
1,208 Expert 1GB
i don't think that date and time is an integer its more like a string..
Sep 12 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Mark Sargent | last post by:
Hi All, why am I getting this error..? Cheers. Mark Sargent. Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: ''
3
by: davidkarlsson74 | last post by:
Error: document.getElementById("folderMenu").cells has no properties File: http://www.volkswagen.se/tillbehor/js/foldermenu.js Rad: 49 The function activates different DIV:s, but doesn't seem to...
3
by: Johnny M | last post by:
using Access 2003 Pardon the subject line, but I don't have a better word for this strange behavior (or behavior I don't understand!!!) I have a class module named DepreciationFactor. One of...
9
by: rsine | last post by:
I have developed a program that sends a command through the serial port to our business system and then reads from the buffer looking for a number. Everything worked great on my WinXP system, but...
3
by: Snow | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' The error happened at this line: if session("systemIdCount" & arrSystems(iLoop)) 0 The code like this:
5
Vini171285
by: Vini171285 | last post by:
Hi, Here in this code we have used CInt before Session,If we wont use CInt the code doesn't work in the intended way....and using CInt sometimes gives error..It works for 1 day & the other day shows...
1
by: Infog | last post by:
I have a dataview, and I am trying to "clone" its structure only in part, by creating a new table via code. I cut out most of the columns, so this is easier to read. My question is - Why does this...
7
vikas251074
by: vikas251074 | last post by:
I am getting error above in following code since few days giving tension day and night. How can I solve this? I am facing since Oct.25. in line no. 362 After doing a lot of homework, I am...
1
by: danielblessie | last post by:
Public Sub EmailTemplates() Dim db As DAO.Database Dim rs As DAO.Recordset Dim MailRecipents As String Dim MailRecipents1 As String Dim MailRecipents2 As String Dim...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.