Hello,
Please tell me why I am getting exception error in this code ??See -error occurs here, (in a movenext). Code used to work using oo4o but suddenly table grew big and code stopped working.Now tried odbc but get exception.Pls help !
<%@ Language=VBScript %>
<%Option explicit%>
<HTML>
<HEAD>
<TITLE> Message Tracking </TITLE>
<META NAME="Author" CONTENT="">
<META NAME="msgtrack,appid,msgobjinfo" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY bgcolor="#F5FAFA"><BR>
<% Server.ScriptTimeout = 10000
Dim OraSession
Dim OraDatabase
Dim objRs ,objRs1
Dim Name,Pwd,Sid,UName,UPwd,USid
Dim strAryWords,strvalue,batch,seq,track,x,x1,msg
Dim send,rec,rec1,dt
Dim k
'send=Trim(Request.Form("send")
'rec=Trim(Request.Form("rec")
'rec1=Trim(Request.Form("rec1")
'dt=Trim(Request.Form("gourl")
dt="13-JUN-02"
send="BOL"
rec="ERPU"
rec1="ERPV"
Dim Applist(3)
Applist(0)=send
Applist(1)=rec
Applist(2)=rec1
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "dsn=ttt;uid=sss;pwd=yyy;"
Set objRs = objConn.Execute("select I.APPNAME, I.ROLE, I.BO, M.TRACKINGID,to_char(M.TIMESTAMP, 'dd-MON-YY') as MSGDATE,to_char(M.TIMESTAMP, 'HH24:MI:SS') as MSGTIME,M.MSGSTATUS from OAIHUB.MESSAGESTATUSTABLE M,OAIHUB.MESSAGEINFOIDTABLE I where M.MESSAGEINFOID=I.MESSAGEINFOID and (I.APPNAME in ('"&applist(0)&"', '"&applist(1)&"', '"&applist(2)&"')) and (to_char(M.TIMESTAMP, 'dd-MON-YY') = ('12-JUN-02')) order by M.TRACKINGID asc,I.ROLE asc, I.APPNAME asc, M.MSGSTATUS asc"
%>
<BR>
<B><CENTER><FONT face="Verdana" SIZE="3" COLOR="Navy"><B>MESSAGE TRACKING</B></FONT></CENTER></B><BR><BR>
<CENTER><TABLE WIDTH=95% BORDER="1" CELLPADDING="8" CELLSPACING="0">
<TR>
<TH COLSPAN=4 BGCOLOR="#C5C5C5">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>INFO</B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR="#C5C5C5">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B><%=APPLIST(0)%></B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR="#C5C5C5">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B><%=APPLIST(1)%></B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR="#C5C5C5">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B><%=APPLIST(2)%></B></FONT></P>
</TH>
</TR>
<TR>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>TRACK INFO</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>DATE</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>BUS.OBJ.</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>ROLE</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>1</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>2</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>OTHER</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>3</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>4</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>OTHER</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>3</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>4</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>OTHER</B></FONT></P>
</TH>
</TR>
<%
Dim i,j
'Do While(objRs1.EOF = FALSE)
'J = objRs1.Fields(0)
'j=j+1
'objRs1.MoveNext
'Loop
'Set OraSession = Nothing
if (objRs.BOF and objRs.EOF) then
response.write "No Records found."
response.end
End if
%>
<%Do While Not (objRS.EOF)%>
<TR>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%=objRs("trackingid"%>
</B></FONT></P>
</TD>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%=objRs("msgdate"%>
</B></FONT></P>
</TD>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%=objRs("BO"%>
</B></FONT></P>
</TD>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%=objRs("Role"%>
</B></FONT></P></TD>
<%
'Run a loop to go through applist where we know applist(0)=BOL,applist(1)=ERPU,...
For k=0 to UBound(applist)
Dim done
if (applist(k)<>objRs("AppName") Then %>
<td> </B></FONT></P>
</TD>
<td> </B></FONT></P>
</TD>
<td> </B></FONT></P>
</TD>
<%
'objRs.MoveNext
Done=True
else
Dim subcolct,currstatus
subcolct=0
if (k=0) Then
currstatus=1
else
currstatus=3
end if
'Response.Write currstatus%>
<%Do While((Applist(k)=objRs("Appname") and (subcolct<2))%>
<%if (currstatus=CInt(objRs("MsgStatus")) Then %>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%'=objRs("MsgTime"%>
<%=objRs("appname"%>
</B></FONT></P></TD>
<%
objRs.MoveNext'(error occurshere)
else
%>
<td> stat diff</B></FONT></P>
</TD>
<%
end if
currstatus=currstatus+1
subcolct=subcolct+1
Loop%>
<%'Code for OTHER status then 1/2/3/4
if not (objRs.EOF) Then
if (objRs("Appname"<>Applist(k)) Then
Dim Currapp
Currapp=objRs("Appname"
If (Applist(k)=Currapp) Then
Do While(Applist(k)=objRs("Appname")
%>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%'=objRs("MsgTime"%>
<%=objRs("trackingid"%>(
<%=objRs("MsgStatus"%>)
</B></FONT></P></TD>
<% objRs.MoveNext
if not (objRs.EOF) Then
Currapp=objRs("Appname"
else
Currapp=" "
end if
Loop
else
%>
<td> </B></FONT></P></TD>
<%
end if
else%>
<td> </B></FONT></P></TD>
<%
end if
end if%>
<%
end if
%>
<%Next
%>
</TR>
<%Loop%>
</TABLE>
<%
objRs.Close
objConn.Close
%>
</center>
</body>
</html>
Please tell me why I am getting exception error in this code ??See -error occurs here, (in a movenext). Code used to work using oo4o but suddenly table grew big and code stopped working.Now tried odbc but get exception.Pls help !
<%@ Language=VBScript %>
<%Option explicit%>
<HTML>
<HEAD>
<TITLE> Message Tracking </TITLE>
<META NAME="Author" CONTENT="">
<META NAME="msgtrack,appid,msgobjinfo" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY bgcolor="#F5FAFA"><BR>
<% Server.ScriptTimeout = 10000
Dim OraSession
Dim OraDatabase
Dim objRs ,objRs1
Dim Name,Pwd,Sid,UName,UPwd,USid
Dim strAryWords,strvalue,batch,seq,track,x,x1,msg
Dim send,rec,rec1,dt
Dim k
'send=Trim(Request.Form("send")
'rec=Trim(Request.Form("rec")
'rec1=Trim(Request.Form("rec1")
'dt=Trim(Request.Form("gourl")
dt="13-JUN-02"
send="BOL"
rec="ERPU"
rec1="ERPV"
Dim Applist(3)
Applist(0)=send
Applist(1)=rec
Applist(2)=rec1
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection"
objConn.Open "dsn=ttt;uid=sss;pwd=yyy;"
Set objRs = objConn.Execute("select I.APPNAME, I.ROLE, I.BO, M.TRACKINGID,to_char(M.TIMESTAMP, 'dd-MON-YY') as MSGDATE,to_char(M.TIMESTAMP, 'HH24:MI:SS') as MSGTIME,M.MSGSTATUS from OAIHUB.MESSAGESTATUSTABLE M,OAIHUB.MESSAGEINFOIDTABLE I where M.MESSAGEINFOID=I.MESSAGEINFOID and (I.APPNAME in ('"&applist(0)&"', '"&applist(1)&"', '"&applist(2)&"')) and (to_char(M.TIMESTAMP, 'dd-MON-YY') = ('12-JUN-02')) order by M.TRACKINGID asc,I.ROLE asc, I.APPNAME asc, M.MSGSTATUS asc"
%>
<BR>
<B><CENTER><FONT face="Verdana" SIZE="3" COLOR="Navy"><B>MESSAGE TRACKING</B></FONT></CENTER></B><BR><BR>
<CENTER><TABLE WIDTH=95% BORDER="1" CELLPADDING="8" CELLSPACING="0">
<TR>
<TH COLSPAN=4 BGCOLOR="#C5C5C5">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>INFO</B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR="#C5C5C5">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B><%=APPLIST(0)%></B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR="#C5C5C5">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B><%=APPLIST(1)%></B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR="#C5C5C5">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B><%=APPLIST(2)%></B></FONT></P>
</TH>
</TR>
<TR>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>TRACK INFO</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>DATE</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>BUS.OBJ.</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>ROLE</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>1</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>2</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>OTHER</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>3</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>4</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>OTHER</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>3</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>4</B></FONT></P>
</TH>
<TH BGCOLOR="#BDC9CE">
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>OTHER</B></FONT></P>
</TH>
</TR>
<%
Dim i,j
'Do While(objRs1.EOF = FALSE)
'J = objRs1.Fields(0)
'j=j+1
'objRs1.MoveNext
'Loop
'Set OraSession = Nothing
if (objRs.BOF and objRs.EOF) then
response.write "No Records found."
response.end
End if
%>
<%Do While Not (objRS.EOF)%>
<TR>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%=objRs("trackingid"%>
</B></FONT></P>
</TD>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%=objRs("msgdate"%>
</B></FONT></P>
</TD>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%=objRs("BO"%>
</B></FONT></P>
</TD>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%=objRs("Role"%>
</B></FONT></P></TD>
<%
'Run a loop to go through applist where we know applist(0)=BOL,applist(1)=ERPU,...
For k=0 to UBound(applist)
Dim done
if (applist(k)<>objRs("AppName") Then %>
<td> </B></FONT></P>
</TD>
<td> </B></FONT></P>
</TD>
<td> </B></FONT></P>
</TD>
<%
'objRs.MoveNext
Done=True
else
Dim subcolct,currstatus
subcolct=0
if (k=0) Then
currstatus=1
else
currstatus=3
end if
'Response.Write currstatus%>
<%Do While((Applist(k)=objRs("Appname") and (subcolct<2))%>
<%if (currstatus=CInt(objRs("MsgStatus")) Then %>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%'=objRs("MsgTime"%>
<%=objRs("appname"%>
</B></FONT></P></TD>
<%
objRs.MoveNext'(error occurshere)
else
%>
<td> stat diff</B></FONT></P>
</TD>
<%
end if
currstatus=currstatus+1
subcolct=subcolct+1
Loop%>
<%'Code for OTHER status then 1/2/3/4
if not (objRs.EOF) Then
if (objRs("Appname"<>Applist(k)) Then
Dim Currapp
Currapp=objRs("Appname"
If (Applist(k)=Currapp) Then
Do While(Applist(k)=objRs("Appname")
%>
<TD ALIGN="CENTER" VALIGN="MIDDLE" >
<P><FONT face="Verdana" SIZE="-1" COLOR="Navy"><B>
<%'=objRs("MsgTime"%>
<%=objRs("trackingid"%>(
<%=objRs("MsgStatus"%>)
</B></FONT></P></TD>
<% objRs.MoveNext
if not (objRs.EOF) Then
Currapp=objRs("Appname"
else
Currapp=" "
end if
Loop
else
%>
<td> </B></FONT></P></TD>
<%
end if
else%>
<td> </B></FONT></P></TD>
<%
end if
end if%>
<%
end if
%>
<%Next
%>
</TR>
<%Loop%>
</TABLE>
<%
objRs.Close
objConn.Close
%>
</center>
</body>
</html>