Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP exception error

Status
Not open for further replies.

scisugi

Programmer
Joined
Jun 18, 2002
Messages
3
Location
US
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=&quot;Author&quot; CONTENT=&quot;&quot;>
<META NAME=&quot;msgtrack,appid,msgobjinfo&quot; CONTENT=&quot;&quot;>
<META NAME=&quot;Description&quot; CONTENT=&quot;&quot;>
</HEAD>

<BODY bgcolor=&quot;#F5FAFA&quot;><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(&quot;send&quot;))
'rec=Trim(Request.Form(&quot;rec&quot;))
'rec1=Trim(Request.Form(&quot;rec1&quot;))
'dt=Trim(Request.Form(&quot;gourl&quot;))
dt=&quot;13-JUN-02&quot;
send=&quot;BOL&quot;
rec=&quot;ERPU&quot;
rec1=&quot;ERPV&quot;

Dim Applist(3)
Applist(0)=send
Applist(1)=rec
Applist(2)=rec1

Dim objConn

Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
objConn.Open &quot;dsn=ttt;uid=sss;pwd=yyy;&quot;

Set objRs = objConn.Execute(&quot;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 ('&quot;&applist(0)&&quot;', '&quot;&applist(1)&&quot;', '&quot;&applist(2)&&quot;')) 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&quot;)

%>
<BR>

<B><CENTER><FONT face=&quot;Verdana&quot; SIZE=&quot;3&quot; COLOR=&quot;Navy&quot;><B>MESSAGE TRACKING</B></FONT></CENTER></B><BR><BR>



<CENTER><TABLE WIDTH=95% BORDER=&quot;1&quot; CELLPADDING=&quot;8&quot; CELLSPACING=&quot;0&quot;>

<TR>
<TH COLSPAN=4 BGCOLOR=&quot;#C5C5C5&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>INFO</B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR=&quot;#C5C5C5&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B><%=APPLIST(0)%></B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR=&quot;#C5C5C5&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B><%=APPLIST(1)%></B></FONT></P>
</TH>
<TH COLSPAN=3 BGCOLOR=&quot;#C5C5C5&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B><%=APPLIST(2)%></B></FONT></P>
</TH>

</TR>
<TR>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>TRACK INFO</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>DATE</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>BUS.OBJ.</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>ROLE</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>1</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>2</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>OTHER</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>3</B></FONT></P>
</TH>

<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>4</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>OTHER</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>3</B></FONT></P>
</TH>

<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>4</B></FONT></P>
</TH>
<TH BGCOLOR=&quot;#BDC9CE&quot;>
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><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 &quot;No Records found.&quot;
response.end
End if

%>


<%Do While Not (objRS.EOF)%>
<TR>
<TD ALIGN=&quot;CENTER&quot; VALIGN=&quot;MIDDLE&quot; >
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>
<%=objRs(&quot;trackingid&quot;)%>

</B></FONT></P>
</TD>
<TD ALIGN=&quot;CENTER&quot; VALIGN=&quot;MIDDLE&quot; >
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>
<%=objRs(&quot;msgdate&quot;)%>
</B></FONT></P>
</TD>
<TD ALIGN=&quot;CENTER&quot; VALIGN=&quot;MIDDLE&quot; >
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>
<%=objRs(&quot;BO&quot;)%>
</B></FONT></P>
</TD>
<TD ALIGN=&quot;CENTER&quot; VALIGN=&quot;MIDDLE&quot; >
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>
<%=objRs(&quot;Role&quot;)%>
</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(&quot;AppName&quot;)) 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(&quot;Appname&quot;)) and (subcolct<2))%>

<%if (currstatus=CInt(objRs(&quot;MsgStatus&quot;))) Then %>
<TD ALIGN=&quot;CENTER&quot; VALIGN=&quot;MIDDLE&quot; >
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>
<%'=objRs(&quot;MsgTime&quot;)%>
<%=objRs(&quot;appname&quot;)%>
</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(&quot;Appname&quot;)<>Applist(k)) Then

Dim Currapp

Currapp=objRs(&quot;Appname&quot;)
If (Applist(k)=Currapp) Then

Do While(Applist(k)=objRs(&quot;Appname&quot;))
%>

<TD ALIGN=&quot;CENTER&quot; VALIGN=&quot;MIDDLE&quot; >
<P><FONT face=&quot;Verdana&quot; SIZE=&quot;-1&quot; COLOR=&quot;Navy&quot;><B>
<%'=objRs(&quot;MsgTime&quot;)%>
<%=objRs(&quot;trackingid&quot;)%>(
<%=objRs(&quot;MsgStatus&quot;)%>)
</B></FONT></P></TD>

<% objRs.MoveNext
if not (objRs.EOF) Then
Currapp=objRs(&quot;Appname&quot;)
else
Currapp=&quot; &quot;
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>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top