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("ADODB.Connection"
objDC.open "act1"
objDC.ConnectionTimeout = 15
objDC.CommandTimeout = 30
objDC.open Application("SQLConnString"
Set objRS = Server.CreateObject("ADODB.Recordset"
If Len(Request.QueryString("id") <> 0 Then
objRS.Open "Select * From act1 where id=" & Request.QueryString("id", objDC, 0, 1
If Not objRS.EOF Then
objRS.MoveFirst
%>
<p><img src="header2.gif" width="400" height="46"> </p>
<h2>Here are the results of your search:</h2>
<table BORDER="0" width="100%" cellpadding="3" bgcolor="#000000">
<tr bgcolor="#CCFFFF">
<th><font face="Arial" color="#000000">Name </font></th>
<th><font face="Arial" color="#000000">Title </font></th>
<th><font face="Arial" color="#000000">Company Name</font></th>
<th><font face="Arial" color="#000000">Address</font></th>
<th><font face="Arial" color="#000000">City</font></th>
<th><font face="Arial" color="#000000">State </font></th>
<th><font face="Arial" color="#000000">ZIP</font></th>
<th><font face="Arial" color="#000000">Phone </font></th>
<th><font face="Arial" color="#000000">Fax </font></th>
<th><font face="Arial" color="#000000">E-mail </font></th>
</tr>
</table>
<%
End If
ObjRS.Close
End If
objRS.Open "act1", objDC, 0, 1
If Not objRS.EOF Then
objRS.MoveFirst
%>
<Form Action="./db_pulldown.asp" method="get">
<Select Name="id">
<option></option>
<%
Do while Not objRS.EOF
%>
<Option Value="<%= objRS.Fields("id"%> "><%= objRS.FIelds("last" %> </option>
<%objRS.MoveNext
Loop
%>
</Select>
<INPUT type="submit" value="Submit">
</form>
<%End If>%
<%objRS.Close
Set objRS = Nothing
objDC.Close
Set objDC = Nothing
%>
[sig][/sig]
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("ADODB.Connection"
objDC.open "act1"
objDC.ConnectionTimeout = 15
objDC.CommandTimeout = 30
objDC.open Application("SQLConnString"
Set objRS = Server.CreateObject("ADODB.Recordset"
If Len(Request.QueryString("id") <> 0 Then
objRS.Open "Select * From act1 where id=" & Request.QueryString("id", objDC, 0, 1
If Not objRS.EOF Then
objRS.MoveFirst
%>
<p><img src="header2.gif" width="400" height="46"> </p>
<h2>Here are the results of your search:</h2>
<table BORDER="0" width="100%" cellpadding="3" bgcolor="#000000">
<tr bgcolor="#CCFFFF">
<th><font face="Arial" color="#000000">Name </font></th>
<th><font face="Arial" color="#000000">Title </font></th>
<th><font face="Arial" color="#000000">Company Name</font></th>
<th><font face="Arial" color="#000000">Address</font></th>
<th><font face="Arial" color="#000000">City</font></th>
<th><font face="Arial" color="#000000">State </font></th>
<th><font face="Arial" color="#000000">ZIP</font></th>
<th><font face="Arial" color="#000000">Phone </font></th>
<th><font face="Arial" color="#000000">Fax </font></th>
<th><font face="Arial" color="#000000">E-mail </font></th>
</tr>
</table>
<%
End If
ObjRS.Close
End If
objRS.Open "act1", objDC, 0, 1
If Not objRS.EOF Then
objRS.MoveFirst
%>
<Form Action="./db_pulldown.asp" method="get">
<Select Name="id">
<option></option>
<%
Do while Not objRS.EOF
%>
<Option Value="<%= objRS.Fields("id"%> "><%= objRS.FIelds("last" %> </option>
<%objRS.MoveNext
Loop
%>
</Select>
<INPUT type="submit" value="Submit">
</form>
<%End If>%
<%objRS.Close
Set objRS = Nothing
objDC.Close
Set objDC = Nothing
%>
[sig][/sig]