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

Strange Error Message on simple script

Status
Not open for further replies.

GWPhoenix

IS-IT--Management
Jun 26, 2001
32
0
0
US
I am running the following code reading the records of a table in Access. I get the following message

Microsoft VBScript compilation (0x800A03FB)
Expected 'Loop'

siting the line where I am setting the objRS to nothing at the end.

Any ideas what's wrong?

Code:
<TABLE BORDER=1>
<TR><TH>Post<br>Date</TH><TH>Application<br>Deadline</TH><TH>EZ/EC<br>Pref</TH><TH>NOFA</TH><TH>Agency</TH></TR>
<%

Do while not objRS.EOF
Response.Write &quot;<TR><TD>&quot; & objRS(&quot;pubdate&quot;) & &quot;</TD>&quot;
Response.Write &quot;<TD>&quot; &objRS(&quot;deadline&quot;) & &quot;</TD>&quot;
	If objRS(&quot;prefezec&quot;) <>&quot;&quot; Then 
		Response.Write &quot;<TD> X </TD>&quot;
	Else 
		Response.Write &quot;<TD>  </TD>&quot;
	End if
Response.Write &quot;<TD><A HREF = 'getnofa9.asp&sumid=&quot; & objRS(&quot;sumid&quot;) & &quot;'>&quot; & objRS(&quot;nofa&quot;) & &quot;</A></TD>&quot;
Response.Write &quot;<TD>&quot; & objRS(&quot;agency&quot;) & &quot;</TD></TR>&quot;

objRS.MoveNext
Loop

objRS.Close
set objRS = Nothing
%>
 
Maybe I'm getting blind in my old age, but the only POSSIBLE problem I can see is the & without a space after it in the following line:

Response.Write &quot;<TD>&quot; &objRS(&quot;deadline&quot;) & &quot;</TD>&quot;

&o (the letter) indicates an octal number, and objRS could cause a error with that.

 
That was it! Thanks mucho!

Couldn't see for looking.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top