473,692 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Type mismatch "CInt"

1 New Member
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:Sim ple 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("da te")) Then
dDate = CDate(Request.Q ueryString("dat e"))
Else
If IsDate(Request. QueryString("mo nth") & "-" & Request.QuerySt ring("day") & "-" & Request.QuerySt ring("year")) Then
dDate = CDate(Request.Q ueryString("mon th") & "-" & Request.QuerySt ring("day") & "-" & Request.QuerySt ring("year"))
Else
dDate = Date()
If Len(Request.Que ryString("month ")) <> 0 Or Len(Request.Que ryString("day") ) <> 0 Or Len(Request.Que ryString("year" )) <> 0 Or Len(Request.Que ryString("date" )) <> 0 Then
Response.Write "Wrong date.<BR><BR>"
End If
End If
End If

iDIM = GetDaysInMonth( Month(dDate), Year(dDate))
iDOW = GetWeekdayMonth StartsOn(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_p age_id%>?date=< %= SubtractOneMont h(dDate) %>">&lt;&lt;</A></div></TD>
<TD ALIGN="center"> <font size="1"><B><%= mnth & " <br> " & Year(dDate) %></B></font></TD>
<TD ALIGN="left"><d iv align="right">< A HREF="<%=reques t.servervariabl es("url")%>?dat e=<%= AddOneMonth(dDa te) %>">&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=""inmatni ng""><b><font size=4><font color=#F49100>" & iCurrent & "</font></font></b></TD>" & vbCrLf
Else
'Response.Write vbTab & vbTab & "<TD align=center><f ont size=2>" & iCurrent & "</font></TD>" & vbCrLf

Response.Write vbTab & vbTab & "<TD align=center><A HREF=""" & request.serverv ariables("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>Evene menten:</b></p>
<p class="Highligh t"><B>Vandaa g: </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("eve nthead")%><br>
<%=getoday("eve ntdesc")%><br>
<a href="<%=getoda y("eventlink")% >" target="_parent ">URL</a>
<hr></td>
</tr>
<% getoday.movenex t
wend%>
<tr class="Highligh tCopy">
<td><b>Volgen de :</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("eve nthead")%><br>
<%=getnext("eve ntdesc")%><br>
<a href="<%=getnex t("eventlink")% >" target="_parent ">URL</a>
<hr></td>
</tr>
<% getnext.movenex t
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("eve nthead")%><br>
<%=getnext("eve ntdesc")%><br>
<a href="<%=getnex t("eventlink")% >" target="_parent ">URL</a>
<hr></td>
</tr>
<% getnext.movenex t
wend%>
<tr class="Highligh tCopy2">
<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("eve nthead")%><br>
<%=getnext("eve ntdesc")%><br>
<a href="<%=getnex t("eventlink")% >" target="_parent ">URL</a>
<hr></td>
</tr>
<% getnext.movenex t
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("eve ntdesc")%><br>
<a href="<%=getnex t("eventlink")% >" target="_parent ">URL</a>
<hr></td>
</tr>
<% getnext.movenex t
wend%>
<tr>
<td>
<a href="http://www.ecddesigns. co.za" target="_Blank" ><small>Event s Calander door
ECDesigns</small></a>
</tr></td>
</table>
Sep 12 '06 #1
1 5947
iam_clint
1,208 Recognized Expert Top Contributor
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
25875
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
9262
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 work on FireFox or Netscape. What could be wrong? The function: function setActiveTab(tabNo) {
3
2489
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 the properties is a follows (irrelevant code omitted):
9
7130
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 when I tried the program on the Win98 system it will be running on, I get the following error: Cast from string "2076719" to type 'Long' is not valid I am not sure why I only get this error on the Win98 system or how to go about correcting...
3
30910
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
2477
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 error...What & why is this problem?? Is there any alternative for "CInt" or we ll hv to include any file.. Please Help ! <%@ language=VBScript%> <% option explicit %> <!--#include virtual="/adovbs.inc"--> <HTML> <BODY> <form method=post...
1
24468
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 always seem to add things a a string? Later in my code, I try to sort based on "View_Order", but it acts like a string. The values sort as 1,2,20,21,22,3,4, NOT 1,2,3,4,20,21,22 like it should. Using Cint() while moving the values from table to...
7
4439
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 surrendered to you. <%@ Language=VBScript%> <%Option Explicit%>
1
1191
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 objOutlook Dim objEmail Dim BodyEmail As String Dim Department As String
0
8611
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9094
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8970
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8814
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7642
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6468
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4332
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2989
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.