Do not use on any
shared computer
September 6, 2008 03:55pm pdt
 
[x]
Attachment Details

Microsoft VBScript runtime error '800a0005' - DateAdd

Tags: Microsoft VBScript runtime error '800a0005' - Invalid procedure call or argument: 'DateAdd'
I got this error when running my program.  The strange thing about this error is there isn't a DateAdd piece of code in the code.  The other strange thing is when I tested the program for all our different branches it only did this on a couple of them, not all of them.

I'm a novice programmer and this is someone's code that I'm looking at so that doesn't help.  I have attached the code.  If you need something else, please feel free to ask.
Thank you,
Kell
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/JXECM.asp" -->
<%
' note: if either date entered by the user is invalid, 
'     the call to CDate will fail with an error.
firstDate = CDate( Request.Form("start") )
lastDate = CDate( Request.Form("end") )
callbranch = Request.Form("branch")
calltype = Request.Form("Code")
 
Dim rsCalls
Dim rsCalls_numRows
 
Set rsCalls = Server.CreateObject("ADODB.Recordset")
rsCalls.ActiveConnection = MM_JXECM_STRING
rsCalls.Source = "SELECT Calls.YourName, Calls.Notes, Calls.CallDate, Code.CSICode, Code.Description, tblCSI.Response, tblCSI.Tocsi, tblCSI.RespondDate, tblCSI.Respondent, tblCSI.CSICODE, tblCSI.Issue, tblCSI.IssueDate, tblCSI.CustomerID, tblCSI.IssueKind, Employee.EmployeeName, Employee.Branch, CustName.CustName, CustName.CompPhone  FROM Employee INNER JOIN (Code INNER JOIN (CustName INNER JOIN tblCSI ON CustName.ContactID = tblCSI.CustomerID) ON Code.CSICode = tblCSI.CSICODE) ON Employee.EmployeeName = CustName.SlsmnName WHERE '" & callbranch & "' = Employee.Branch AND  '" & calltype & "' = Code.CSICode AND Calls.CallDate BETWEEN #" & firstDate & "# AND #" & lastDate & "# ORDER BY Calls.CallDate DESC"
rsCalls.CursorType = 0
rsCalls.CursorLocation = 2
rsCalls.LockType = 1
rsCalls.Open()
 
rsCalls_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
 
Repeat1__numRows = -1
Repeat1__index = 0
rsCalls_numRows = rsCalls_numRows + Repeat1__numRows
 
'Dim ResponseTime = RespondDate - IssueDate
%>
<html>
<head>
<title>CSI Report</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body>
<!--#include file="header.inc"-->
<br>
<table width="1027" border="1" align="center" cellspacing="0">
  <tr bgcolor="#0099FF"> 
    <td colspan="13"> <div align="Center"><strong>CSI Report</strong></div></td>
  </tr>
  <tr bgcolor="#CCCCCC"> 
    <td width="20" nowrap><font size="-1"><strong>Branch</strong></font></td>
    <td width="30" nowwrap><font size="-1"><strong>Customer</strong></font></td>
    <td width="20" nowrap><font size="-1"><strong>Phone</strong></font></td>
    <td width="20" nowrap><font size="-1"><strong>Code #</strong></font></td>
    <td width="25" nowrap><font size="-1"><strong>To</strong></font></td>
    <td width="20" nowrap><font size="-1"><strong>Issue Type</strong></font></td>
	<td width="20" nowrap><font size="-1"><strong>Issue Date</strong></font></td>
	<td width="87" nowrap><font size="-1"><strong>Issue</strong></font></td>
	<td width="20" nowrap><font size="-1"><strong>Respondent</strong></font></td>
	<td width="20" nowrap><font size="-1"><strong>Response Date</strong></font></td>
	<td width="87" nowrap><font size="-1"><strong>Response</strong></font></td>
	</tr>
  <% 
While ((Repeat1__numRows <> 0) AND (NOT rsCalls.EOF)) 
%>
  <% If Not rsCalls.EOF Or Not rsCalls.BOF Then %>
  <tr> 
    <td nowrap width="20"><font size="-1"><%=(rsCalls.Fields.Item("Branch").Value)%></font></td>
    <td nowrap width="30"><font size="-1"><%=(rsCalls.Fields.Item("CustName").Value)%></font></td>
    <td nowrap width="20"><%=(rsCalls.Fields.Item("CompPhone").Value)%><br> 
    <td nowrap width="20"><%=(rsCalls.Fields.Item("CSICode").Value)%><br>
    <td nowrap width="25"><%=(rsCalls.Fields.Item("Tocsi").Value)%><br>
    <td nowrap width="20"><%=(rsCalls.Fields.Item("IssueKind").Value)%><br>
    <td nowrap width="20"><%=(rsCalls.Fields.Item("IssueDate").Value)%><br>
    <td nowrap width="87"><%=(rsCalls.Fields.Item("Issue").Value)%><br>
    <td nowrap width="20"><%=(rsCalls.Fields.Item("Respondent").Value)%><br>
    <td nowrap width="20"><%=(rsCalls.Fields.Item("RespondDate").Value)%><br>
    <td nowrap width="87"><font size="-1"><%=(rsCalls.Fields.Item("Response").Value)%><br>
    </font></td>
    
  </tr>
  <% End If ' end Not rsCalls.EOF Or NOT rsCalls.BOF %>
  <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  rsCalls.MoveNext()
Wend
%>
  <tr> 
    <% If rsCalls.EOF And rsCalls.BOF Then %>
    <td colspan="13">No 
      Info Available</td>
    <% End If ' end rsCalls.EOF And rsCalls.BOF %>
  </tr>
</table>
 
</body>
</html>
<%
rsCalls.Close()
Set rsCalls = Nothing
%>
Start your free trial to view this solution
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Question Stats
Zone: Internet
Question Asked By: mschmidt14
Solution Provided By: hongjun
Participating Experts: 2
Solution Grade: A
Views: 29
Translate:
Loading Advertisement...
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by RobSampson

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by RobSampson

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by RobSampson

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by RobSampson

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by RobSampson

Rank: Genius

Expert Comment by RobSampson:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Expert Comment by hongjun

Rank: Sage

Expert Comment by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Accepted Solution by hongjun

Rank: Sage

Accepted Solution by hongjun:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
[+][-]Author Comment by mschmidt14
Author Comment by mschmidt14:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080723-EE-VQP-34 / EE_QW_2_20070628