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

Microsoft VBScript compilation error '800a0400' 1

Status
Not open for further replies.

rjn2001

Programmer
Dec 29, 2004
172
GB
Code:
Microsoft VBScript compilation error '800a0400' 

Expected statement 

/viewjob.asp, line 113 

End If
^

This is the error I am getting....

this is the code

Code:
<%
If (objRs.EOF) then
%>
<P>Sorry, we do not hold any information about your previous Job history.
Else
<CENTER>
<FONT SIZE="5"><B>
Previous Job History

</B>
</FONT>
</CENTER>

<BODY>

<BR><BR>
<TABLE border=1>
<TR>
<TD>Job Start Date</TD>
<TD>Job End Date</TD>
<TD>Organisation Name</TD>
<TD>Job Title</TD>
<TD>Job Description</TD>
</TR>


Do While Not (objRs.EOF)
%>
<TR>
<TD><%=objRs("JobStart")%></TD>
<TD><%=objRs("JobFinish")%></TD>
<TD><%=objRs("EmployerName")%></TD>
<TD><%=objRs("JobRole")%></TD>
<TD><%=objRs("JobDetail")%></TD>
</TR>
<%
objRs.MoveNext
Do While Not (onjRs.EOF)
%>
</TABLE>
<BR>
<BR>
<A HREF="menu.asp">Return to the Main Menu</A>

			
			
			
			<tr>
				<td>
		<font face="Arial" size="2">
		<p align="center" style="margin-top: -1px; margin-bottom: -1px"><b>&nbsp;<a href="profile.asp?userid=<%=strUsername %>">View Profile</a> ||
				<a href="edit.asp?.rand=<%= Md5Hash %>">Edit Account</a> ||
				<a href="register.asp">New Sign Up</a> ||
				<a href="forgot.asp?.rand=<%= md5Hash %>">Recover Password</a> 
				|| 
		<a href="logout.asp?<%= Request.ServerVariables("QUERY_STRING")%>">Logout
		</a> </b></p>
		<p align="center" style="margin-top: -1px; margin-bottom: -1px">&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</font></td>
			</tr>
		</table>
		<!-- #include file="footer.asp" -->		


<%
End If       ****** LINE 113
objRs.Close
Set objRs=Nothing
objConn.Close
Set objConn=Nothing
%>
</body>
</html>

Line 113 is marked.

Could you please help to solve this erro?, I dont REALLY know what I am doing!!!

Cheers!

Richard Noon
 
You must be careful with the <% ... %> pairs.
<%
If (objRs.EOF) then
%>
<P>Sorry, we do not hold any information about your previous Job history.
<%
Else
%>
<CENTER>
...
</TR>
<%
Do While Not (objRs.EOF)
%>
<TR>
<TD><%=objRs("JobStart")%></TD>
...
</TR>
<%
objRs.MoveNext
Loop
%>
</TABLE>
...
!-- #include file="footer.asp" -->
<%
End If ****** LINE 113
objRs.Close
Set objRs=Nothing
objConn.Close
Set objConn=Nothing
%>
</body>
</html>

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PH,

I have an error on this line:

Code:
<%
If (objRs.EOF) then   **** This line
%>
<P>Sorry, we do not hold any information about your previous Job history.
Else

The error is:

Code:
Microsoft VBScript runtime error '800a01a8' 

Object required: '' 

/viewjob.asp, line 48

I aint trying to get away with doing no work!, i just really dont know what I am doing with VB.

Thanks alot for your assistance!

Richard Noon
 
BTW, where is the objRs object nstantiated and opened ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I apologise, but I am wholly familiar with what you are referring to.

Never done VB before in my life!

Here is the source for my entire page though, I hope this may be of some assistance.

Code:
<!--#include file="security.asp" -->
<%

Dim SQL
Dim UserID


UserID = Request.QueryString ("UserID")

strSQL = "select * from tblprivatepageJob where UserID = '" &UserID& "' order by JobStart" 

set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "D:/Websites/richard/admin/db/users.mdb"




'File: viewJob.asp
'Description: Authorised Page
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr xmlns-asp="null" xmlns-shell="null"><HEAD>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="copyright" content="Copyright (C) 2005 Blue Alumni Resourcing">
<META content=en-us name=MS.LOCALE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="Blue Alumni Resourcing" name=keywords>
<link rel="stylesheet" type="text/css" href="css.css">
<META content="<%= Date() %>" name=last-updated>
<title><%= strUsername %>, User Panel</title>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" link="#3366CC" vlink="#008000" alink="#FF0000">

		<H1><img border="0" src="images/BARLogo.gif" width="125" height="110"> Private Page 2</H1></p>
<p align="center" style="margin-top: -1px; margin-bottom: -1px">
		&nbsp;</p>
		<table border="0" width="100%" id="table1">
			<tr>
				<td>
		<h3>Today:&nbsp;<b><%= Date() %></b> ,Welcome&nbsp;<b><%= rsCheckUser("First_Name") %>&nbsp;<%= rsCheckUser("Last_Name") %>&nbsp;(Login as: <%= strUserName %>)</b>, to 
		<%= strWebsiteName %></h3></td>
			</tr>
			<tr>
			<td>
			<BODY>
<%
If (objRs.EOF) then
%>
<P>Sorry, we do not hold any information about your previous Job history.
Else
<CENTER>
<FONT SIZE="5"><B>
Previous Job History

</B>
</FONT>
</CENTER>

<BODY>

<BR><BR>
<TABLE border=1>
<TR>
<TD>Job Start Date</TD>
<TD>Job End Date</TD>
<TD>Organisation Name</TD>
<TD>Job Title</TD>
<TD>Job Description</TD>
</TR>
<%
Do While Not (objRs.EOF)
%>
<TR>
<TD><%=objRs("JobStart")%></TD>
<TD><%=objRs("JobFinish")%></TD>
<TD><%=objRs("EmployerName")%></TD>
<TD><%=objRs("JobRole")%></TD>
<TD><%=objRs("JobDetail")%></TD>
</TR>
<%
objRs.MoveNext
Loop
%>
</TABLE>
</TABLE>
<BR>
<BR>
<A HREF="menu.asp">Return to the Main Menu</A>

			
			
			
			<tr>
				<td>
		<font face="Arial" size="2">
		<p align="center" style="margin-top: -1px; margin-bottom: -1px"><b>&nbsp;<a href="profile.asp?userid=<%=strUsername %>">View Profile</a> ||
				<a href="edit.asp?.rand=<%= Md5Hash %>">Edit Account</a> ||
				<a href="register.asp">New Sign Up</a> ||
				<a href="forgot.asp?.rand=<%= md5Hash %>">Recover Password</a> 
				|| 
		<a href="logout.asp?<%= Request.ServerVariables("QUERY_STRING")%>">Logout
		</a> </b></p>
		<p align="center" style="margin-top: -1px; margin-bottom: -1px">&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</font></td>
			</tr>
		</table>
		<!-- #include file="footer.asp" -->		
<%
End If     
objRs.Close
Set objRs=Nothing
objConn.Close
Set objConn=Nothing
%>
</body>
</html>

Richard Noon
 
After the conn.Open line add something like this:
Set objRs = conn.Execute(strSQL, , 1)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top