Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
| Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2005, 04:18 PM
Authorized User
Points: 96, Level: 1
Points: 96, Level: 1 Points: 96, Level: 1 Points: 96, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2004
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default error '800a01a8' Object not found

A student ID is input into Request.htm. If the ID is found, the record is returned from an access table called students. When published, the request form accepts the id 101 but then shows this error.
Can anyone see what I'm doing wrong? (The field is text in the mdb.)

Code for Request.htm:

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Enter Student Id</title>
<meta name="Microsoft Theme" content="sandston 1011">
<meta name="Microsoft Border" content="tb, default">
</head>

<body>
<form Name = "Request" Action = "results.asp" method = "POST">
<p>Enter Student Id for class registration information:</p>
<table border="0">
<tr><td align = "left" width="99"> <i> Student ID </i>
     </td>
    <td> <input type ="text" size = 4 name = "StudID"> </td>
    </tr>

    </table>
    <p>&nbsp;&nbsp; <a href="results.asp">&nbsp;goto results page</a></p>
    <p> <input type = "submit" value = "Submit StudID">
    <input type = "reset" value = "Reset Form"> </p>
    </form>

</body></html>


Code for results.asp:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Student Class Registration Information</title>
<meta name="Microsoft Theme" content="sandston 1011">
<meta name="Microsoft Border" content="tb, default">
</head>

<body>
<center>
<h2> Student Class Registration Information</h2>
<h3> A test of the Web-Based Client/Server Programming with ASP and VBScript</h3><br>

<%
dim myconnection
dim rsTitleList
dim connectstring
dim sqlString
dim requestStudID


connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("student.mdb")

set myconnection = Server.CreateObject("ADODB.Connection")
set rsTitleList = Server.CreateObject("ADODB.Recordset")

myconnection.open connectString
requestStudId = Request.Form("StudID")
sqlString = "Select * from [students] where StudentID = '" & requestStudID &"'"
set rsTitleList = myconnection.Execute(sqlString)


if (rsTitleList.bof) and (rsTitleList.eof) then
    response.write("Sorry, Student ID Number was not found.")
else
%>

<table align=center Colspa=14 cellpadding=10 border=0 width=300>
<!-begin column header row ->
<tr><td valign = top bgcolor="#800000">

        Student ID</td>
    <td valign = center bgcolor="#800000">

        Last Name</td>
    <td valign = center bgcolor="#800000">

        First Name</td>
    <td valign = center bgcolor="#800000">

        Class1</td>
    <td valign = center bgcolor="#800000">

        Class2</td>
    <td valign = center bgcolor="#800000">

        Class3</td>
    <td valign = center bgcolor="#800000">

        Class4</td>
    <td valign = center bgcolor="#800000">

        Class5</td>
</tr>

<!-Get Data->
<% do while not reTitleList.EOF %>
<tr> <td bgcolor="f7efde" align = center>

        <%=rsTitleList("StudentID")%></td>
    <td bgcolor="f7efde" align = center>

            <%=rsTitleList("Lastname")%></td>
<td bgcolor="f7efde" align = center>

        <%=rsTitleList("Firstname")%></td>
 <td bgcolor="f7efde" align = center>

        <%=rsTitleList("Class1")%></td>
<td bgcolor="f7efde" align = center>

        <%=rsTitleList("Class2")%></td>
<td bgcolor="f7efde" align = center>

        <%=rsTitleList("Class3")%></td>
<td bgcolor="f7efde" align = center>

        <%=rsTitleList("Class4")%></td>
<td bgcolor="f7efde" align = center>

        <%=rsTitleList("Class5")%></td>
</tr>
<% rsTitleList.MoveNext %>
<% loop %>
<% End If %>

</table>
</center)
</body>
</html>

 
Old January 3rd, 2005, 12:28 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

If StudentID is numeric then try the following query:

sqlString = "Select * from [students] where StudentID = " & requestStudID & ""

Else can you show the exact error message and the line where this error comes up?

Om Prakash




Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft VBScript runtime error '800a01a8' Abbas Classic ASP Basics 1 July 21st, 2006 11:43 AM
Microsoft VBScript runtime error '800a01a8' Abbas Classic ASP Professional 1 July 21st, 2006 11:42 AM
Microsoft VBScript runtime error '800a01a8' object stevesole Access ASP 9 June 7th, 2004 08:13 PM
Microsoft VBScript runtime error '800a01a8' gmoney060 BOOK: Beginning ASP 3.0 1 June 2nd, 2004 01:18 PM
runtime error '800a01a8' Object Required: 'Session footohi Classic ASP Basics 1 July 17th, 2003 06:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.