I have a simple asp page...it looks up pishipdate in database...compares it to current system date...if pishipdate is 21 prior to current date the program is supposed to list those purchase orders.
When I do a response.write this error is produced:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'nowtemp'
/ifmchina/unifactory/datedifftest2.asp, line 56
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If I leave the response.write out I get this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'madtemp'
/ifmchina/unifactory/datedifftest2.asp, line 56
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Below is the code.....any suggestions will be appreciated
******************************************************
<%Response.buffer = true
'connection definitions
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET CONN = server.CreateObject("ADODB.connection"
Set rsdsn = Server.CreateObject("ADODB.Recordset"
CONNSTR = "DSN=PSPLUSHDR"
CONN.Open CONNSTR
strSQL1 = "Select * FROM PSPLUSHDR ORDER BY FCODE"
rsdsn.Open strSQL1, conn,1,3
%>
<!-- #INCLUDE FILE="ADOVBS.INC" -->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Inventory Slippage Report</TITLE>
</HEAD>
<BODY>
<FORM method=post action="datedifftest2.asp">
<TABLE border=1 cellspacing=0 cellpadding=0 align="center" size=99%>
<%
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IF rsdsn.EOF = false then 'the psl purchase order header file%>
<TR>
<TD><B><CENTER>Standard PO#</CENTER></b></TD>
<TD><B><CENTER>Customer PO#</CENTER></b></TD>
<TD><B><CENTER>MAD Date</CENTER></b></TD>
<TD><B><CENTER>Time Elapsed</CENTER></b></TD>
</TR>
<%
WHILE rsdsn.EOF = false
IF rsdsn("PIShipDate" = "999999" then
rsdsn("PIShipDate" = ""
ELSE
IF rsdsn("PIShipDate" = null then
rsdsn("PIShipDate" = ""
ELSE
IF rsdsn("PIShipDate" = " " then
rsdsn("PIShipDate" = ""
ELSE 'any other number
IF rsdsn("PIShipDate" <> "" then
pitemp = trim(rsdsn("PIShipDate")
if len(pitemp) = 5 then pitemp = "0" & pitemp
madtemp = left(pitemp,2) & "/" & MID(pitemp,3,2) & "/" & right(pitemp,2)
nowtemp = left(formatdatetime(NOW(),2),2) & "/" & MID(formatdatetime(NOW(),2),3,2) & "/" & right(formatdatetime(NOW(),2),2)
'Response.Write rsdsn("PONUM"
elapsedtime = datediff("D",nowtemp,madtemp)
IF elapsedtime < -20 THEN %>
<TR>
<TD><CENTER><A href="podetail.asp"><%= rsdsn("PONUM"%></A></CENTER></TD>
<TD><CENTER><%= rsdsn("CPONUM"%></CENTER></TD>
<TD><CENTER><%= madtemp%></CENTER></TD>
<TD><CENTER><%=elapsedtime%> days</CENTER></TD>
</TR>
<%END IF
END IF
END IF
END IF
END IF
rsdsn.movenext
wend
ELSE%>
No MAD dates have been exceeded by 21 days at this time.
<BR><a href="<%Request.ServerVariables("HTTP_REFERER"%>">Click Here to Return to Previous Page</a>
<%END IF%>
</TABLE><%
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rsdsn.Close
Response.End
%>
</FORM>
</BODY>
</HTML>
*********************************************************
When I do a response.write this error is produced:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'nowtemp'
/ifmchina/unifactory/datedifftest2.asp, line 56
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If I leave the response.write out I get this error:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'madtemp'
/ifmchina/unifactory/datedifftest2.asp, line 56
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Below is the code.....any suggestions will be appreciated
******************************************************
<%Response.buffer = true
'connection definitions
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET CONN = server.CreateObject("ADODB.connection"
Set rsdsn = Server.CreateObject("ADODB.Recordset"
CONNSTR = "DSN=PSPLUSHDR"
CONN.Open CONNSTR
strSQL1 = "Select * FROM PSPLUSHDR ORDER BY FCODE"
rsdsn.Open strSQL1, conn,1,3
%>
<!-- #INCLUDE FILE="ADOVBS.INC" -->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>Inventory Slippage Report</TITLE>
</HEAD>
<BODY>
<FORM method=post action="datedifftest2.asp">
<TABLE border=1 cellspacing=0 cellpadding=0 align="center" size=99%>
<%
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IF rsdsn.EOF = false then 'the psl purchase order header file%>
<TR>
<TD><B><CENTER>Standard PO#</CENTER></b></TD>
<TD><B><CENTER>Customer PO#</CENTER></b></TD>
<TD><B><CENTER>MAD Date</CENTER></b></TD>
<TD><B><CENTER>Time Elapsed</CENTER></b></TD>
</TR>
<%
WHILE rsdsn.EOF = false
IF rsdsn("PIShipDate" = "999999" then
rsdsn("PIShipDate" = ""
ELSE
IF rsdsn("PIShipDate" = null then
rsdsn("PIShipDate" = ""
ELSE
IF rsdsn("PIShipDate" = " " then
rsdsn("PIShipDate" = ""
ELSE 'any other number
IF rsdsn("PIShipDate" <> "" then
pitemp = trim(rsdsn("PIShipDate")
if len(pitemp) = 5 then pitemp = "0" & pitemp
madtemp = left(pitemp,2) & "/" & MID(pitemp,3,2) & "/" & right(pitemp,2)
nowtemp = left(formatdatetime(NOW(),2),2) & "/" & MID(formatdatetime(NOW(),2),3,2) & "/" & right(formatdatetime(NOW(),2),2)
'Response.Write rsdsn("PONUM"
elapsedtime = datediff("D",nowtemp,madtemp)
IF elapsedtime < -20 THEN %>
<TR>
<TD><CENTER><A href="podetail.asp"><%= rsdsn("PONUM"%></A></CENTER></TD>
<TD><CENTER><%= rsdsn("CPONUM"%></CENTER></TD>
<TD><CENTER><%= madtemp%></CENTER></TD>
<TD><CENTER><%=elapsedtime%> days</CENTER></TD>
</TR>
<%END IF
END IF
END IF
END IF
END IF
rsdsn.movenext
wend
ELSE%>
No MAD dates have been exceeded by 21 days at this time.
<BR><a href="<%Request.ServerVariables("HTTP_REFERER"%>">Click Here to Return to Previous Page</a>
<%END IF%>
</TABLE><%
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rsdsn.Close
Response.End
%>
</FORM>
</BODY>
</HTML>
*********************************************************