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

Expected end of statement End If>% HELP!

Status
Not open for further replies.

chassid

MIS
Aug 27, 2000
58
US
All,

I coded an asp page that gets values from a database and places them into a listbox. Seems pretty easy, but I keep getting this warning:
Microsoft VBScript compilation error '800a0401'

Expected end of statement

/engine10.asp, line 57

End If>%
------^

I believe this end if is at the end of the program. Tried everything to fix it, but couldn't find the answer! If anyone can figure it out please respond. Thanks!

Here is the code:

<%
Dim objDC, objRS

Set objDC = Server.CreateObject(&quot;ADODB.Connection&quot;)
objDC.open &quot;act1&quot;
objDC.ConnectionTimeout = 15
objDC.CommandTimeout = 30

objDC.open Application(&quot;SQLConnString&quot;)
Set objRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)

If Len(Request.QueryString(&quot;id&quot;)) <> 0 Then
objRS.Open &quot;Select * From act1 where id=&quot; & Request.QueryString(&quot;id&quot;), objDC, 0, 1
If Not objRS.EOF Then
objRS.MoveFirst
%>
<p><img src=&quot;header2.gif&quot; width=&quot;400&quot; height=&quot;46&quot;> </p>
<h2>Here are the results of your search:</h2>
<table BORDER=&quot;0&quot; width=&quot;100%&quot; cellpadding=&quot;3&quot; bgcolor=&quot;#000000&quot;>
<tr bgcolor=&quot;#CCFFFF&quot;>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>Name </font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>Title </font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>Company Name</font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>Address</font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>City</font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>State </font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>ZIP</font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>Phone </font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>Fax </font></th>
<th><font face=&quot;Arial&quot; color=&quot;#000000&quot;>E-mail </font></th>
</tr>
</table>
<%
End If
ObjRS.Close
End If

objRS.Open &quot;act1&quot;, objDC, 0, 1

If Not objRS.EOF Then
objRS.MoveFirst
%>
<Form Action=&quot;./db_pulldown.asp&quot; method=&quot;get&quot;>
<Select Name=&quot;id&quot;>
<option></option>
<%
Do while Not objRS.EOF
%>
<Option Value=&quot;<%= objRS.Fields(&quot;id&quot;)%> &quot;><%= objRS.FIelds(&quot;last&quot;) %> </option>
<%objRS.MoveNext
Loop
%>
</Select>
<INPUT type=&quot;submit&quot; value=&quot;Submit&quot;>
</form>

<%End If>%

<%objRS.Close
Set objRS = Nothing
objDC.Close
Set objDC = Nothing
%>



[sig][/sig]
 
4 eyes are sometimes better than 2...

Line 57
<%End If>%

change to

<%End If%>

Rob [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top