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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Error Message

Status
Not open for further replies.

new2programming

Programmer
Mar 6, 2003
4
US
Microsoft VBScript compilation error '800a03ea'

Syntax error

/Training_Dept/RTPL.asp, line 43

rs.MoveNext Wend rs.Close Set rs = Nothing
------------^
If any one knows a fix for this please inform. Here is the code for that page.

Code:
<%@ Language=VBScript %>
<%Response.Buffer = True%>
<!--#include file=&quot;include/RPTConnect.asp&quot;-->
<html>

<head>
<title>Performance Overview Account Services/Teleservices by Class (Totals) Report</title>
</head>

<body background=&quot;WB00760_.gif&quot;>

<hr>

<hr>

<p><font size=&quot;4&quot;>Performance Overview Account Services/Teleservices by Class (Totals)
Report</font></p>

<hr>

<hr>
<!--#include file=&quot;include/menu.asp&quot;-->
<%

LocCity = Request.Form(&quot;LocCity&quot;)

If LocCity = &quot;&quot; Then



SQL = &quot; SELECT LocCity From ZZLocCity &quot;


Set rs=Server.CreateObject(&quot;ADODB.RecordSet&quot;)
rs.Open SQL, MyDSN


%>

<form Method=&quot;Post&quot;>
<p><select Name=&quot;LocCity&quot; id=&quot;LocCity&quot; size=&quot;1&quot;>
<option Selected>--Select City-- <%While Not RS.EOF%> </option>
<option value=&quot;<%=RS(&quot;LocCity&quot;)%>&quot;> <%=RS.Fields(&quot;LocCity&quot;)%> <% rs.MoveNext Wend rs.Close Set rs = Nothing %> </option>
</select> <input type=&quot;submit&quot; name=&quot;btnSearch&quot; value=&quot;Search&quot;> </p>
</form>
<%
Else


SQLT = &quot;SELECT DISTINCT Classes.TName From Classes Where LocCity = '&quot;&LocCity&&quot;'&quot;



Set rsT=Server.CreateObject(&quot;ADODB.RecordSet&quot;)
rsT.Open SQLT, MyDSN


%>

<form action=&quot;RPTPOTACLSTotRD2.asp?Yr=<%=varYrA%>&quot; method=&quot;Post&quot;>
<input type=&quot;hidden&quot; name=&quot;LocCity&quot; value=&quot;<%=LocCity%>&quot;><p><select name=&quot;TName&quot;
id=&quot;TName&quot; size=&quot;1&quot;>
<option selected>--Select Name-- <%While Not rsT.EOF%> </option>
<option value=&quot;<%=rsT(&quot;TName&quot;)%>&quot;> <%=rsT.Fields(&quot;TName&quot;)%> <% rsT.MoveNext Wend rsT.Close Set rsT = Nothing %> </option>
</select> <input type=&quot;submit&quot; name=&quot;btnSearch&quot; value=&quot;Search&quot;> </p>
</form>
<%End If%>
</body>
</html>

 
I thought I answered this for you new2programming in the vbscript forum.

diud you try the suntax changes needed ? _________________________________________________________
for the best results to your questions: FAQ333-2924
01001111 01101110 01110000 01101110 01110100
onpnt2.gif
[/sub]
 
Sorry about that, Yes I have tried the suggest that you made but it didn't change the out come. I have the same code on another page and it works just fine. So I also tried to copy that code into this page and I still get the error message. I than tried to delete the page that I was receiving the error and start a new page with a different name but the same code from the page that was working but that didn't work. if you have any other suggestion please post them.
 
first thing I do want to stress is the code does need to be formatted correctly the way I suggested in the first thread. it will cause you headache anfter headache not following those guidlines as sometimes it will work and sometimes it will not.

I'l take a look at the code a bit better and let you knwo if I see anything unless someone else sees it first [smile] _________________________________________________________
for the best results to your questions: FAQ333-2924
01001111 01101110 01110000 01101110 01110100
onpnt2.gif
[/sub]
 
I changed the loop to a do while and it ran fine
try it this way
<%
Else

SQLT = &quot;SELECT DISTINCT Classes.TName From Classes Where LocCity = '&quot;&LocCity&&quot;'&quot;
Set rsT=Server.CreateObject(&quot;ADODB.RecordSet&quot;)
rsT.Open SQLT, MyDSN
%>
<form action=&quot;RPTPOTACLSTotRD2.asp?Yr=<%=varYrA%>&quot; method=&quot;Post&quot;>
<input type=&quot;hidden&quot; name=&quot;LocCity&quot; value=&quot;<%=LocCity%>&quot;>
<p><select name=&quot;TName&quot; id=&quot;TName&quot; size=&quot;1&quot;>
<option selected>--Select Name--
<% Do While Not rsT.EOF %>
</option>
<option value=&quot;<%=rsT(&quot;TName&quot;)%>&quot;><%=rsT.Fields(&quot;TName&quot;)%>
<%
rsT.MoveNext
Loop

rsT.Close
Set rsT = Nothing
%>
</option>
</select>
<input type=&quot;submit&quot; name=&quot;btnSearch&quot; value=&quot;Search&quot;></p>
</form>
<% End If %>
</body> _________________________________________________________
for the best results to your questions: FAQ333-2924
01001111 01101110 01110000 01101110 01110100
onpnt2.gif
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top